View Full Version : rotate to direction
09-21-2010, 10:17 PM
I was wondering if there was a way to make an object rotate into the direction its moving like a you can do with particle flow (rotate speed space follow)
is there an animation controller type that can do this for single objects or maybe another solution that can accomplish this.
09-22-2010, 04:38 AM
I am not sure how to do this, if you use an spline to animate you can choose to follow the curvature of the path.
Another way is after you create the animation you clone the animation to another dummy object. And then you offset it slightly ahead of your object, after that you can choose to use a lookAt controller for rotation (if i remember the name correctly ) that points to the dummy ahead.
09-22-2010, 04:47 AM
You could sample the position of the object at 2 places in time (current frame and previous frame), then create a vector between those points and set the object's "dir" property to = that vector.
I'm sure you could wire this up into a script controller or something so it's all automated, but here's a simple demonstration:
---Create some positional keyframes on an object, select it, and run this script
for q in 0 to 100 do
slidertime = q
p1 = $.pos
at time (q-1) (p2 = $.pos)
v1 = p1 - p2
$.dir = v1
09-22-2010, 03:39 PM
very nice script Tyson, by the way i have seen your building generator and i love it.
09-22-2010, 03:50 PM
the script doesnt really work for me but maybe Im doing something wrong here :(
Open the Utilities tab, click on More..., select Follow/Bank utility.
It has been around since probably Max 2 or even earlier, and I have never used it...
09-22-2010, 05:54 PM
I don't believe it !!! Yes it is there ...
09-22-2010, 09:23 PM
I would have liked it more as a animation controller for the rotation but this certainly does the trick for now.
A position animation controller that would move the object into the direction that its pointing toward would also be awesome. especially combined with a lookat controller.
09-22-2010, 09:23 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2014, Jelsoft Enterprises Ltd.