|
hi. fairly new to unity, with some minor experience in programming. i've set up a trigger region (the start point), which contains a target (transform) that i'm trying to toss the player character to (like a catapult). i've tried using this setup but it doesn't work for me: http://unity3d.com/support/documentation/ScriptReference/Vector3.Slerp.html i've also tried a series of Vector3.Lerps, but don't think that's the smartest way to go about it. also: i cannot for the life of me get this to play out for longer than a second, no matter what i multiply Time.time or Time.deltaTime with (from .0000001 to 1000000). do i need to move this function outside of function Update? any help would be greatly appreciated. i've been stuck for about a week! :) thanks.
(comments are locked)
|
|
See this these questions for multiple solutions: thanks for these links.
Feb 17 '10 at 06:12 AM
andy_the_baker
(comments are locked)
|
|
The third parameter of Slerp is clamped between 0 and 1 (so it will never exceed these values). So in your case you would probably use something like:
Where Hope this helps... :-) you know what the problem was? i was declaring and reassigning the variables constantly. it was arcing but at the end it was slow because it was slerping between smaller and smaller positions. taking the start/end out of the loop was the solution. thanks for your help in understanding the timing. it was helpful.
Feb 17 '10 at 06:14 AM
andy_the_baker
(comments are locked)
|
