A shape made up of a connected set of points that are all equal distance from a center point.
-1
votes
1answer
74 views
is there a way to check if a point is inside circle, other than distance between points?
I am struggling with floating point precision problems. Is there some method to do the same test, but with less precision errors? the usual method uses square root.
1
vote
1answer
77 views
How to draw an arc between two angles?
I'd like to draw an arc between two specific angles. For example, "draw an angle between 0 and 90 degrees" and it will draw only that part of the circle and ignore the rest.
1
vote
0answers
27 views
Game Maker Studio: How to make Player Circular Movement
I want to make a player move in circular but not that he move automatic but manual. Similar like in the game Zero Refelx.
1
vote
0answers
13 views
Making an 'anim in circular motion' get attracted by gravity of the center
I am working on a project, where the main player anim is in circular motion with respect to a center point. This video shows what I have done to the anim till now.
In that video, there are multiple ...
0
votes
1answer
31 views
Object orbitting 2D circle java
I'm using this code to make a square that orbits a circle . When i use it however the rect(); is quite far away from the circumference of the circle, i would like to make it closer. All variables are ...
0
votes
0answers
27 views
Resizing a procedurally generated arc mesh
I have a script that generates a mesh representing a 2D arc. This arc is generated when the game starts based on a size (radians), width, etc...
I would like to know if there's any fast way to resize ...
1
vote
1answer
37 views
Circular Movement
if (Keyboard.isKeyDown(Keyboard.KEY_D)) {
if (i < 360) {
setX((float) (groundState.getX() + groundState.getRadius() * Math.cos(Clock.delta() * i)));
setY((float) (groundState....
1
vote
0answers
65 views
2d Circle different ARC's Collision detection
The way to detect collision between 2 circles or circle and line .
using trigonometry
But now i like be able to detect which part of the circle arcs im hitting ,
for example i divided my circle to 4 ...
1
vote
3answers
73 views
How to calculate Joystick margins/tresholds?
On Joystick that gives Float position values from -1 to 1 on either of x and y axis, how to implement proper math, that adds "lower" and "higher" circular margin?
For example if lower margin is 25% ...
5
votes
2answers
225 views
Drawing circles at the background of a 3D scene and updating their size
So, here is what I am trying to do in Unity 5 (using C#). I want to draw a a 2D circle at the background of a 3D scene and apply a texture/image to fill it.
Just like it would be if the circle was in ...
2
votes
1answer
130 views
Objective-C SpriteKit – How to make a circle of buttons
I have some code in a project already, but I'd like to change it up a bit. Currently, my code creates an empty node called _buttonLayer and then create some buttons to add to it. My buttons start from ...
2
votes
2answers
145 views
Draw 3D ellipse in monogame/xna
I am programming a 3d solar system (simulator).
To describe the path of a planet I wanted to add 3D rectangles.. and draw them.
But this ; no surprise; decreased the frame rate extremly.
Also it does ...
1
vote
0answers
59 views
GJK algorithm in case of circle and polygon?
I wonder if it's possible to modify GJK so I can use it to detect collision between circle and n points polygon.
I implemented for polygon and polygon before, and I tried modifying the support ...
3
votes
3answers
124 views
Moving objects in a circular path, and also moving the whole group
I have 8 elements distributed in a circle, with a common center.
All of them move along a circular path, just like the poster in this question asked:
Moving an object in a circular path
This solves ...
2
votes
2answers
248 views
2D multiple circle collision response
I'm trying to implement simple 2D circle collision system. There are circles with different radiuses and velocities (the larger the circle the slower it is). Contrary to all the questions on the Stack,...
0
votes
2answers
130 views
How does collisions caculates when developing game in Build an HTML5 Game book
I don't understand authors login when calculating collisions between two circles (bubbles). Here is the Calculating collisions section.
Author writes:
The bubble being fired follows a set of ...
2
votes
2answers
102 views
Detect collision that happen between frames, between slices of moving, rotating circles?
To detect a collision between two circles, we check if the distance between their centers is smaller than the sum of their radii.
To detect a collision between a slice (in this case half) of a circle ...
1
vote
1answer
285 views
How do I make circles bounce off each other realistically?
I'm trying to create bouncing balls with realistic physics. At the moment, when the balls hit each other, they bounce back in the same direction they came from. How do I make them more realistic?
I ...
0
votes
1answer
231 views
LibGDX collision with rectangle and circle
I have 2 objects, A and B, both are classes with only values, so positions and dimensions are only values (float posX,posY).
I have a render class which render A and B with shapeRenderer; A is ...
3
votes
5answers
406 views
How to “merge” multiple intersecting circles so that only the outer edges of each show?
In my RTS (In Unity) each unit or building has strategic circles in a similar fashion to SupCom. If you have multiple units or buildings selected it looks like the picture to the left. I want to make ...
0
votes
0answers
98 views
Grab all tiles within a radius?
I'm working on a 2D tile based game. I want NPC's to be able to destroy tiles, and ideally I would have a function, which takes a central x,y and then based upon a circular area from that point (...
1
vote
4answers
3k views
Collision between AABB and Circle
I'm programming collision systems for a 2D game engine. The idea is that different systems can interact with each other. So one of the cases would be check collisions between axis aligned bounding box ...
-1
votes
1answer
60 views
How the values of h and the perpendicular had computed
How the values of h and the perpendicular had computed or taken in this answer of a previous question??? please clarify it
How can I make a spline out of three points that define circular arc?
3
votes
2answers
302 views
Intersection between moving circle and some squares
I'm developing a 2D game made of squares.
What I need to do is check if a circle collides with any of the squares as it moves.
I have a raycast function to check the same idea, but using a point. I ...
2
votes
1answer
167 views
How to calculate max region/area of 2d circles?
I have some 2d circles on a plane, each has its own minRadius and maxRadius. When two circles collides, both of them will shrink their radius, so the actual radius of a circle is in range [minRadius, ...
1
vote
3answers
472 views
How do I resolve a collision of a circle with two rectangle corners?
I'm writing a simple non-physical one-circle-to-many-rectangles collision detector/resolver.
For collision detection, I'm using a very common algorithm, and it's working pretty well.
For collision ...
4
votes
3answers
175 views
How can I merge the corners of fractally-generated borders so they look natural?
I'm using a fractal generator to generate borders around a rectangular area. It works great, but my problem is with corners.
A naive implementation when the left border overlaps the top border:
...
2
votes
1answer
756 views
How can I make a spline out of three points that define circular arc?
I was looking at the descriptions of various curve techniques here and noticed the mention of circular arcs. I want to implement something like this, but I'm not quite sure what the correct formula to ...
0
votes
1answer
662 views
How to solve the overlap of two circles that collide
I have two circles , one of the circles is static the other is moving around. I have a method that checks whether the two circles collide. How to make the two circles don't overlap when colliding?
...
0
votes
1answer
67 views
Revert to closest non intersecting position
First, let me start by saying:
Please forgive me if this question have already been asked. I've tried to search but didn't find any solution. (It might be due to my lack of terms).
I have two ...
2
votes
4answers
1k views
How to set speed of circular motion
Edit 2 - clarification
Just to clarify, the issue I have at the moment is how I specify a time (in seconds) for a complete revolution to occur. My delta is fixed and is 1/ticks per second (1/60). ...
5
votes
1answer
742 views
Animation of moving circle by square's outer surface
I want to make this animation in OpenGL, here I attached a simple gif how I want it to looks like:
Main problem is that I can not figure out how to move by corner - circle should smoothly move by ...
1
vote
2answers
603 views
Bouncing off a circular Boundary with multiple balls?
I am making a game like this :
Yellow Smiley has to escape from red smileys, when yellow smiley hits the boundary game is over, when red smileys hit the boundary they should bounce back with the ...
3
votes
2answers
5k views
OpenGL GL_LINE_STRIP produces arcs with visible line edges
Another member mentioned an issue while drawing arcs with GL_LINE_STRIP.
He has GL_LINE_SMOOTH enabled.
The question is, how could he avoid the tiny gaps between vertices without increasing their ...
1
vote
1answer
4k views
How to draw a circle with WebGL using GL_POINTS [closed]
I'm trying to draw a circle using simple vertices points and a big gl_PointSize value. I found this example and try to reproduce it on WebGL with no success.
0
votes
1answer
427 views
Revolve FlxSprites Around a Central FlxSprite in Flash Game made with Flixel
I have been working on a Flash game made in Flash Builder using the Flixel library. I have been trying to dynamically create a group of FlxSprites , and revolve them around a player controlled class ...
5
votes
1answer
728 views
HLSL Circle all white
I have been trying to get my shader code (HLSL) to draw a simple circle but after a day and a half I am getting nowhere. It seems people are using the x^2 + y^2 = r^2 and remap texcoords but I only ...
4
votes
2answers
8k views
How to draw a smooth circle in Android using OpenGL?
I am learning about OpenGL API on Android. I just drew a circle. Below is the code I used.
public class MyGLBall {
private int points=360;
private float vertices[]={0.0f,0.0f,0.0f};
private ...
0
votes
3answers
793 views
Why circles are not created if small?
I have changed the scale to my own and now I cant create any object, including circle, if it is of the size which is normal for my scale. I am to create big object first and then modify it to smaller ...
0
votes
4answers
14k views
How do I make a circular hole inside an editable poly without boolean operations?
I have created a rectangle, then converted it into an editable poly. Then I created a circle and converted it to editable poly too. How to make it so that that the circle becomes a hole in the ...
1
vote
2answers
758 views
Circular movement - eliminating speed ups near Y = 0
I have a basic algorithm to rotate an enemy around a 200 unit radius circle with center 0. This is how I'm achieving that:
if (position.Y <= 0 && position.X > -200)
{
position.X -= 2;...
1
vote
2answers
656 views
Tangent to a circle through a point
I'm trying to figure out how to calculate the following angle:
I know center (p1) and radius (r) of a circle. Given a point p3 I want to calculate the angle a such as the tangent (tan) of the circle ...
4
votes
1answer
1k views
How to bounce a 2d point particle off of a circular edge
In a prototype I'm building, a particle can spawn anywhere within a larger, confining circle. Important to note is that the particle will not spawn in the origin of the larger circle, but anywhere ...
2
votes
1answer
332 views
Implementing Circular Sprite Masks
So I've been scouring the interwebs for a couple of days with regards to how to implement sprite masking in XNA 4 and C#. Coming from a pet project I did in Flash, this was pretty easy as masks are ...
9
votes
4answers
2k views
Circle inside circle collision
In one of my projects I have a game area in the shape of a circle. Inside this circle another small circle is moving around. What I want to do is keep the small circle from moving outside the bigger ...
3
votes
2answers
1k views
In Box2D, how can I check for bodies within a circle?
I'm trying to sample random positions to find one that is sufficiently far from other bodies.
Hence I'd need to test for bodies within a given circle. So far, I've used b2World::QueryAABB around my ...
1
vote
1answer
595 views
How to handle circle penetration
I've been working on cirlce to circle collision and have gotten the intersection method working correctly, but I'm having problems using the returned values to actually seperate the circles from one ...
4
votes
2answers
8k views
Drawing a circle in OpenGL ES Android, squiggly boundaries
I am new to OpenGL ES and facing a hard time drawing a circle on my GLSurfaceView. Here's what I have so far.
The circle class
public class MyGLBall {
private int points=40;
private float ...
7
votes
5answers
1k views
Circular Bullet Spread not Even
I'm creating a bullet shooter much in the style of Touhou. Right now I want to have a very simple circular shot being fired from the enemy.
However, the spacing is very uneven, which isn't very good ...
1
vote
3answers
674 views
How does this circle collision detection math work?
I'm going through the wildbunny blog to learn about collision detection. I'm confused about how the vectors he's talking about come into play.
Here's the part that confuses me:
p = ||A-B|| – (r1+...