3D Movement and trigonometry

Started by
2 comments, last by Jossos 10 years, 10 months ago

Hey, I'm not so good at trigonometry and require some assistance. I want a 3D scene to move when I drag with the middle mouse button. The scene can be rotated freely in the x and y directions (2 floats xRot and yRot), a functionality I already have working. What I want is the scene to translate(move) right, left, up down(I do some calculations of the mouse position), but I want the scene to move according to its current rotation. It's hard to describe, but I think It's understandable.

edit: What I want is similar to the camera-move function you find in most modelling programs. It shifts the scene in a direction with your mouse.

Help is greatly appreciated!

Advertisement

You barely need any trigonometry for any of that. What is it you are having trouble with?

You barely need any trigonometry for any of that. What is it you are having trouble with?

well How do I calculate the movement?

Opp sorry ignore me. I'm stupid I've been overcomplicating the problem :/

This topic is closed to new replies.

Advertisement