Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Keep Initial Rotation and Apply Position Shift
#1
I had an object generated by 3ds Max, when I put it in the scene, it need some rotation to get it right in the scene.
However, when I started the SplineWalkerCon I lost those initial values:
I changed line (107) in SplineWalkerCon:
 transform.rotation = Spline.GetOrientationFast(mTF) * initialRotation;
to use the initial rotation which I copied it in the Start() from the transform object.

I did something similar on lines (95, 102) for position:
                mTransform.position += positionShift;

I wanted to have my object walking above the Spline. Did I do something unnecessary (did Curvy already have such a feature?) and is this performant or you guys would consider adding it to script in a better way?

Thanks for the tool, made my life 1000x easier.
 
Reply
#2
The easiest way to apply any offset is to make your object a child of the GameObject that has the Walker attached and offset the child.
Reply
#3
(04-24-2014, 06:47 AM)'Jake' Wrote: The easiest way to apply any offset is to make your object a child of the GameObject that has the Walker attached and offset the child.


 

Stupid me. Sure, that goes for the rotation as well. It worked thanks.

 

 
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Question question about the local position brucezhu99 4 139 09-18-2021, 12:02 PM
Last Post: _Aka_
  get world vector3 from absolute position on spline hawken 2 442 06-08-2021, 12:28 PM
Last Post: hawken
  Create a path with Curvy from a "position" animation with several keyframes mc_deimon 1 462 05-20-2021, 10:04 AM
Last Post: _Aka_
  Get position on spline relative to world position Mos Def 9 2,028 05-20-2021, 08:32 AM
Last Post: _Aka_

Forum Jump: