Moving an object relative to the camera

Blitz3D Forums/Blitz3D Beginners Area/Moving an object relative to the camera

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.

My latest project has a small square map (a flat 3d mesh) that can be rotated. What I would like to do is now be able to allow the user to change the view from side on to top view (and everything inbetween). In theory all I have to do is rotate around the X axis.

This works fine. I hit a problem though when I've rotated the map (rotated around the Y axis). If I've turned the square 45 degrees around Y then try to rotate it around X, I expect to see the corner of the square that's now facing me go straight up and over. Instead it rotates based on the original x axis and not what I'm now looking at (ie, it seems to rotate from right over to left).

Does anyone have any ideas on how to have it rotate how I'd like it to? (ie. relative to how it's now seen from the camera?)