Phil Jones' pitch and roll example

Blitz3D Forums/Blitz3D Programming/Phil Jones' pitch and roll example

Ok, first set the mesh to entitypickmode 2 and do something like this ...

anglenew# = yaw -90  						; what must be added to yaw to calculate front of vehicle's global x,z co-ords
xnew# = x+Cos(anglenew)*carlength
znew# = z+Sin(anglenew)*carlength
LinePick xnew, EntityY( car) + 10 , znew, 0,-10,0
PositionEntity pfront,xnew,PickedY(),znew ; a visual marker only - not neccessary for calculations


You'll have to play with the +-10 thing and it's just the first part so you get the idea. The same could be done with collisions and is probably faster.

Stevie