Extracting a rotation from 3D points

Blitz3D Forums/Blitz3D Programming/Extracting a rotation from 3D points

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Tanks are actually pretty easy ... I did something a while back where I could use the left / right analogues to control the power to each track. Basically it could turn on the spot by locking them in opposite directions ... worked well :) You will need to use a few tricks with very bumpy terrain though.

You don't need to add any new constraints/pointmasses ... just store references to ones already there. Using a box, for example, for the roll-axis alignment you will already create a constraint which connects the front lower left to the front lower right verlet. For each rigid body, simply store this same constraint in Roll-Axis_Align.constraint.

Then get the vector by subtracting the x,y,z positions of the two verlets which are connected by the constraint and aligntovector using this.

Make sense?

Stevie