#### Archived

This topic is now archived and is closed to further replies.

# How do I implement an arc rotate tool?

This topic is 6296 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I like the arc rotate tool in 3DSMax and I was wondering how it works. Can somebody help me with this?

##### Share on other sites
Its really kind of simple when you think about it.

First of, what does it do...

When you move the mouse left and right, it rotates the camera around a circle while looking at its own center.

So, First detect the mouse movement in the same way that you would use to rotate a mesh. (you can find tutorials on this.) But instead of changing theta for the mesh, store it to a variable. Using simple trig, you can find out where the camera should be at any particular degree. Move the camera to that location, and set the camera''s lookat to the origin, or the selected object etc.

The problem with the above is that you have to use the camera''s local coordinates, rather than world coordinates.

Hope that helps.

-AcidBurn

##### Share on other sites
quote:
Original post by AcidBurn
Its really kind of simple when you think about it.

First of, what does it do...

When you move the mouse left and right, it rotates the camera around a circle while looking at its own center.

So, First detect the mouse movement in the same way that you would use to rotate a mesh. (you can find tutorials on this.) But instead of changing theta for the mesh, store it to a variable. Using simple trig, you can find out where the camera should be at any particular degree. Move the camera to that location, and set the camera''s lookat to the origin, or the selected object etc.

The problem with the above is that you have to use the camera''s local coordinates, rather than world coordinates.

Hope that helps.

-AcidBurn

Thanks for your reply, but I still have a few questions. Like how do you calculate the radius of the circle, and it''s centerpoint?

1. 1
2. 2
Rutin
18
3. 3
4. 4
5. 5
frob
12

• 9
• 21
• 12
• 9
• 17
• ### Forum Statistics

• Total Topics
632607
• Total Posts
3007385

×