Object collision
#11

Quote:
Originally Posted by ranme15
Посмотреть сообщение
Thank you!
So basically it is a rocket moving by MoveObject (non-homing). I got the ending position, now am I using just CA_RayCastLine to know if it collides with other objects?
Correct. You fill in start and end coords, pass it a set of 3 variables to store the hit point in and save the return value as well to determine if it was a hit or not. It will return 0 if it didn't hit anything, 20000 for Water and otherwise the Model ID.
Technically, you can just use the Hit Point as destination and make it explode there if something was hit. Otherwise use the destination as end point.

If you want mappings etc to be considered as well, use CA_CreateObject (additionally to CreateDynamicObject) - or use the DC Object functions (which handles both Collision and Streamer Objects). It's described pretty well in the Include as well.
Reply


Messages In This Thread
Object collision - by ranme15 - 30.06.2017, 20:06
Re: Object collision - by ranme15 - 01.07.2017, 14:20
Re: Object collision - by Hansrutger - 01.07.2017, 15:14
Re: Object collision - by coool - 01.07.2017, 15:26
Re: Object collision - by Whatname - 01.07.2017, 15:33
Re: Object collision - by ranme15 - 01.07.2017, 15:43
Re: Object collision - by Hansrutger - 01.07.2017, 17:43
Re: Object collision - by Nero_3D - 01.07.2017, 19:57
Re: Object collision - by NaS - 01.07.2017, 21:48
Re: Object collision - by ranme15 - 01.07.2017, 21:59
Re: Object collision - by NaS - 01.07.2017, 22:43

Forum Jump:


Users browsing this thread: 1 Guest(s)