Advertisement

Collision Detection

Started by July 19, 2003 09:45 PM
5 comments, last by Smokey97 21 years, 7 months ago
Hey, just a quick question about Collision Detection... as i am confsued. alright, why do we detect collision along a timestep, why not just detect collision every frame with the current coordinates? I can only think of one reason, and that would be because there chould be something moving so fast that it might bypass something without colliding with it... any answers or comments would be great Thanks in advance.
yeah, that is the reason.
Advertisement
Yep... that''s exactly the reason.. let''s say you have 2 really flat planes that are about to collide head to head.. But since they are moving so fast, it''s possible that the frame where 1 object overlap the other never gets rendered. In that case they''ll pass each other right through. Definely something we don''t wanna see.
heh im still trying to figure out how to do timesteps my collision detection is every frame

My fellow Americans I have just signed legislation that outlaws Russia forever. Bombing will commence in five minutes.
My fellow Americans I have just signed legislation that outlaws Russia forever. Bombing will commence in five minutes.
I have a relatively simple game in the making, the boundaries are mostly rectangular. So I was wondering if it would be easiest in my case to simply draw a point directly below my camera(on the ground), and then use the distance formula to find if I''m too close to a wall, and if I am, than stop changing translating to that value. Boundaries are at x=3 or -3,and z=0 or 24. Or would it be pretty much just as efficient to just say if(xpos>2.75) Lock(xpos); //where Lock would make it so you can''t keep adding or subtracting to x(adding in this case).

DON''T COPY THAT FLOPPY!
----------Invincible intelligence isn't evincible.
MillaTime: Again it seems that you are doing collision detection at that one single frame. Even though it actually works pretty well most of the times, but if you have a fast moving object on a slow machine, you can still penerate the wall quite easily (since distance is an absolutely value, so you can have x = 2.76 and 2.77 at the next frame even though it''s on the other side of the wall..

Advertisement
ok, i didnt get into the tutorial that much, but i THINK it looks about 150 seconds into the future, wouldnt it be good enough to jsut go 1 frame into the future of the object your testing for collision, and then do a few time steps... and then if it does not collide, move that object in that direction? (does that make sense?)

This topic is closed to new replies.

Advertisement