Keeping track of Direction (after Rotation)
Blitz3D Forums/Blitz3D Programming/Keeping track of Direction (after Rotation)
| ||
I'm fairly new to 3d (infact you might have seen my noob questions before) and I'm having trouble with keeping track of an entities direction/visible face. Picture this. An object is flying through space, it rotates: 90 degrees along it's X axis 90 degrees along it's Z axis 90 degrees along it's Y axis and finally... -90 degrees along it's Z axis Now the object is actually back facing where it started, however, the counters I've used to track rotations are not (X = 90, Y = 90, Z = 0). My dilema is knowing which way my ship is facing in space. Does Blitz have an obvious feature for this that I'm unaware of? I hope you understand what I'm talking about! |
| ||
It's best not to try and track entity positions/rotations with variables like you might do in 2D -- just rotate it however much you need, then call EntityPitch/Yaw/Roll () to get its current rotation... same for X/Y/Z. You could of course read EntityX/Pitch/Whatever into a variable if you need to do some calculations on it afterwards. |
| ||
Thanks! One of those 3d things eh? |