Jump to content

Smooth camera movement?


megaman54

Recommended Posts

For example:

Suppose I want to move an object X from place A to place B. Distance between both is 100 units. Okay?

Remember that "speed = distance/time"

If I want X to be moved to B in 5 seconds:

you must use onClientPreRender (or onClientRender, dunno which is better), and then set X's position relative to "100/fps" (fps may be around 30, if I'm right) from A to B (it's + math operation).

Link to comment
Attach it to an object and move the object. Update camera position by using the event onClientPreRender.

God, I was going to post that lol

Seriously, I thought "why not moveObject for camera?", /me remembers the objects and... Eureka lol

This can be used for rotation too; the last three arguments on moveObject aids that. You can also set your camera facing point from the direction with some useful functions in the wiki ;)

Link to comment

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...