Sign in to follow this  
Jossos

3D Movement and trigonometry

Recommended Posts

Jossos    343

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!

Edited by Jossos

Share this post


Link to post
Share on other sites
Jossos    343

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

well How do I calculate the movement?

Edited by Jossos

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this