Tricky trig

Blitz3D Forums/Blitz3D Programming/Tricky trig

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.

The only thing that jumps off the page when I read this is that the rotation is far too complicated.

2D rotation is much simpler than 3D since it can be represented by a single number, an angle. If, say, the child has a rotation of 20 and the parent 50 then the child vector can be rotated by 30 ( = 50 - 20 ) to give it the parent's rotation.

In the notation of the example code the child movement vector can be rotated just once.
The angle is ( parent_global_rot - child_global_rot ).