4D Collision Detection
Hello there!
I made a top-down game width (very) simple physics, I only used bounding boxes and only checked for intersection.
This worked pretty good, but when the player bumped into a wall, it became jerky, and depending on the framerate, the player would stop at different distances from the wall.
One simple solution would be to take small steps, but Im looking for a more accurate solution, that will work in all situations.
From what I know, the "best" solution would be to calculate collisions in 4D. But perhaps its too slow and hard to come up with the algorithms?
Any opinions/pointer are greatly appreciated!
btw. have anybody seen any demos/research on 4D-collision detection?
/Fredrik Olsson
Er...this game...is it in 2d ? 3d ? 4d ?
Are you speaking of testing for collision ahead of time, or what ?
Bugle4d
Are you speaking of testing for collision ahead of time, or what ?
Bugle4d
~V'lionBugle4d
February 11, 2002 10:51 PM
4D is OK, but you won''t get the accuracy you could get by calculating it in 27D!
quote:
Original post by Vlion
Er...this game...is it in 2d ? 3d ? 4d ?
Are you speaking of testing for collision ahead of time, or what ?
Bugle4d
No, he''s talking about "sweep" testing (I think), where you add a dimension to test exactly at what time a collision occur. Yet, if your game is 2D, you only need 3D testing.
Example 1: A point moving through space can be represented by a line segment with the start/end points. You can now test for line/polygon intersection to see where, and exactly WHEN a collision will occur.
Example 2: A line moving through space can be represented by a polygon. Now do polygon/polygon intersection testing to see, again, where and when the collision will occur.
This is what I do in my engine. I sweep a shere through space, and see where the intersection (collision) occurs.
Etc...
SS
February 12, 2002 07:37 AM
Sorry about the poor explanation of my problem.
Im talking about collisions with 3D-geometry.
Like Axter suspected Im looking for a method to determine exactly when in time a collision occurs.
I have tested ray/triangle intersection, but it doesnt work with
triangles in all cases:
_/\_
\/t1\/
/____\
\/
Sorry for the bad art..
This is supposed to show a situation where ray/triangle intersection doesn''t work..
Two triangle with T1 moving into the screen.
Since none of the rays from the vertices in T1 is colliding with t2(the other triangle), the move will be approved, even though t1 is moving through t2.
Im talking about collisions with 3D-geometry.
Like Axter suspected Im looking for a method to determine exactly when in time a collision occurs.
I have tested ray/triangle intersection, but it doesnt work with
triangles in all cases:
_/\_
\/t1\/
/____\
\/
Sorry for the bad art..
This is supposed to show a situation where ray/triangle intersection doesn''t work..
Two triangle with T1 moving into the screen.
Since none of the rays from the vertices in T1 is colliding with t2(the other triangle), the move will be approved, even though t1 is moving through t2.
Sorry about the poor explanation of my problem,
and the above post![](smile.gif)
Im talking about collisions with 3D-geometry.
Like Axter suspected Im looking for a method to determine exactly when in time a collision occurs.
I have tested ray/triangle intersection, but it doesnt work with
triangles in all cases:
"...__/\__..."
"...\/t1 \/..."
".../____\..."
"......\/....."
Sorry for the bad art..
This is supposed to show a situation where ray/triangle intersection doesn't work..
Two triangle with T1 moving into the screen.
Since none of the rays from the vertices in T1 is colliding with t2(the other triangle), the move will be approved, even though t1 is moving through t2.
Edited by - FXO on February 12, 2002 8:48:48 AM
and the above post
![](smile.gif)
Im talking about collisions with 3D-geometry.
Like Axter suspected Im looking for a method to determine exactly when in time a collision occurs.
I have tested ray/triangle intersection, but it doesnt work with
triangles in all cases:
"...__/\__..."
"...\/t1 \/..."
".../____\..."
"......\/....."
Sorry for the bad art..
This is supposed to show a situation where ray/triangle intersection doesn't work..
Two triangle with T1 moving into the screen.
Since none of the rays from the vertices in T1 is colliding with t2(the other triangle), the move will be approved, even though t1 is moving through t2.
Edited by - FXO on February 12, 2002 8:48:48 AM
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement