collision in-between a frame?

Posted By: ventilator

collision in-between a frame? - 03/27/03 18:23

code:
             ^
|
|
|
|
e1-----------+--------------->
|
|
|
|
e2

if i have two entities which start movement at e1 and e2 and the next frame they are positioned at the end of the arrows, is there a collision triggered when they meet in-between a frame but don't touch each other at the beginning or end of the movement?
Posted By: ello

Re: collision in-between a frame? - 03/27/03 23:44

it could be possible thru vector-mathematics, but i dont know exactly how to do it(just a hint) [Roll Eyes]
Posted By: ello

Re: collision in-between a frame? - 03/27/03 23:57

hi, i found this one but its in german: this
Posted By: ventilator

Re: collision in-between a frame? - 03/28/03 00:54

thanks for the link it's a good summary of vector mathematics. but actually i only would like to know if ent_move detects such a collision?
Posted By: mudhole

Re: collision in-between a frame? - 03/28/03 04:54

You can only move a single entity at a time. So, say you moved e1 from it's start position to its end position -> No Collision.

Then you move e2 from its start position to its end position -> No Collision.

You can either resolve this by slowing down the entities -> if they move slower the chance that the collision will be missed is reduced.

Or use vector maths to determine the collision point. Not really too difficult -> just the intersection of two lines.
Posted By: Anonymous

Re: collision in-between a frame? - 03/28/03 05:02

quote:
Originally posted by mudhole:
Or use vector maths to determine the collision point. Not really too difficult -> just the intersection of two lines.

Line intersection won't help much. Better use extruded spheres. This may sound complicated, but is not. Gamasutra has an article on this in its archives.
Posted By: ventilator

Re: collision in-between a frame? - 03/28/03 05:10

now i understand... thanks for your explanation!

...
and if i do a trace and an entity passes this ray in-between a frame does it trigger an event then? does this trace ray stay there during all the entity movements until the next frame gets drawn?
© 2024 lite-C Forums