Car Shooter
#1

Hi
http://www.youtube.com/watch?feature...&v=UVD6ugnyl68
How can I do this in the video system of the vehicle hit an object, how do I know that?
Waiting for your help.
Reply
#2

Help please
Reply
#3

You mean when the missile hits an object, not when the vehicle hits an object, right?
Reply
#4

Yes, the car will explode when it hits.
Reply
#5

Quote:
Originally Posted by Gamer_Z
Посмотреть сообщение
You can get the vehicle size (array released somewhere on this forum - SEARCH) and vehicle position (GetVehiclePos) and vehicle rotation matrix from GetVehicleRotationQuat (and creating a rotation matrix with GetVehicleMatrix include), then you can check if a line goes through the sphere the vehicle occupies.

http://stackoverflow.com/questions/2...sects-a-sphere
http://gamedev.stackexchange.com/que...here-intersect
http://www.realtimerendering.com/intersections.html

And bytheway.. it's called "Ray-Sphere Intersection".
Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)