Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to change the look direction of a character at end of path
I tried 

[font="JetBrains Mono", monospace]m_OnEndReached.AddListener(Listener);[/font]

[font="JetBrains Mono", monospace][font="JetBrains Mono", monospace]private void Listener(CurvySplineMoveEventArgs arg0)
    //transform.Rotate(transform.rotation.x,180, transform.rotation.z);
    transform.rotation = Quaternion.Euler(transform.rotation.x,180, transform.rotation.z);

[font="JetBrains Mono", monospace][font="JetBrains Mono", monospace]in SplineController..[/font][/font]

[font="JetBrains Mono", monospace][font="JetBrains Mono", monospace]I get the callback but the object never rotates?[/font][/font]
The controllers control the object's transform, so any modification to the transform will get overriden at the next update call of the controller. To change the orientation, I recommand you to modify the Direction parameter of the controller. If you want to do further modifications on the transform, then you will have to disable your controller while running your own logic, or use a custom controller (that overrides BaseController or any of its children classes) that will incorporate in its logic the logic you want to apply.
Have a nice day
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.

Possibly Related Threads…
Thread Author Replies Views Last Post
  GameObjects that move along the path of Curvy Splines will protrude. yanke 3 45 Yesterday, 11:58 AM
Last Post: _Aka_
  Change to Random Spline on End Reached Event ricke 10 538 09-14-2021, 12:31 AM
Last Post: ricke
  Autogenerate bezier curve with a given direction AnAsianPanda 3 358 08-06-2021, 09:08 AM
Last Post: _Aka_
Shocked Change spline path at runtime burn0815 7 1,490 05-27-2021, 08:27 PM
Last Post: _Aka_

Forum Jump: