simple question
i dont know how to rotate a vehicle on a random map based on the surface normal of the triangle where it is located on
(also considering the vehicle''s own rotation...)
help would be appreciated!
Hmmm, off the top of my head you need to take the cross-product of the plane normal & the vehicle orientation vector (ie straight up from the roof). Use the resultant vector in glRotate3f(rx,ry,rz,d) where d is the number of degrees to rotate (ie the number of degrees between the vehicle vector & the plane normal) which you can find using a dot-product.
I dunno if that will work, but it should be a step in the right direction.
Brad
I dunno if that will work, but it should be a step in the right direction.
Brad
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement