|
I've kinda burned myself out working so much on these scripts, and I haven't been able to figure this part out. I have this section of the Locomotion project which aligns a character to the center of gravity. So if the character is running around the planet, he'll rotate along it, and gravity pulls him "down". But sometimes if he goes too fast, the rotation direction won't work quickly enough. And since gravity pulls him to his "down", (and his "down" is pointing some other direction now) he'll go flying in another direction. I can fix the gravity issue later, but it's this rotation that's really bugging me. What's a good method of making this transition instant?
(comments are locked)
|
|
I don't know much about character animation... but, if the character is a rigid body, you can turn on "interpolate" in the Rigidbody portion in the inspector window for your character... that might work. Good luck! Ryder This made the rotation exactly as I needed. As Mr. Johansen said, as "instant" as I had wanted ended up being less than my already-low expectations. This system is going to be more of a "suction-cup-boot" system as mentioned, since it will only be activated at high speeds. Thanks to both of you!
Jun 08 '10 at 04:10 PM
Tuah
(comments are locked)
|
|
These lines are responsible for the smoothing:
If you want an instant transition, change it to this instead:
However, note that this may not actually produce desirable results.
In conclusion, the method should be thought more to simulate "suction cup boots" / "magnetic boots" that only have any effect while on a surface - and has limitations even then, and it's really not very suitable for simulating gravity.
(comments are locked)
|
