# Samuel Wahlberg

Member

4

1 Neutral

• Rank
Newbie

• Interests
Art
Audio
Design
Programming

## Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

1. ## Moving circle to Aabb collision

Thanks for all good feedback. It is so hot in Sweden now so I am only able to test stuff when the sun is away and the temperature is dropping 🙂
2. ## Moving circle to Aabb collision

Thanks Fulcrum. I need to google some to understand how to do it.
3. ## Moving circle to Aabb collision

Thanks for the response. I will look at the litterature you recomended as well as checking out conservative advancement. C. Ericsons book is really good! The other ones will be interresting to check out.
4. ## Algorithm Moving circle to Aabb collision

This is my first post to this forum and I have tried to search for an answer before posting. I do apologize in advance if it has already been answered. I am coding a rather simple "breakout" type of game but need rather accurate collision also for fast moving objects. Basically the moving object is always circles and the objects that would change the directions of the circles are always AABB's. I know how to calculate the closest points from a circle to an AABB and I know how to use line segment to AABB (slabs) collision checks. My idea is to from the current circle position add the velocity vector and put a new circle in the new position and use line segment parallel with the velocity vector for the "edges" between original position and displayed position. However my question is how to get the fraction of the movement to collision accurate so I within the same time step can go to the intersection and for the rest of the movement within that time step move it in the new direction? The player will be able to increase the speed so the movement between time steps might be quite big. With a pure slab test I would get the fraction but it would be hard to describe the circle at the end of the circle with pure line segments without getting to many and getting poor performance. Would it be a decent solution to do a binary search on the velocity vector until it is not colliding but closest point is within an allowed maximum? Is there better algoritms to accomplish this?