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
#1
I tried 

m_OnEndReached.AddListener(Listener);

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);
}


in SplineController..

I get the callback but the object never rotates?
Reply
#2
Hi
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
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Duplicate Prefab along path rickgplus 1 339 01-23-2025, 10:09 AM
Last Post: _Aka_
  Can't set CG Path Controller j95677 4 615 10-04-2024, 06:55 PM
Last Post: j95677
  Rasterized Path Range issue proton 7 844 04-30-2024, 11:17 AM
Last Post: _Aka_
  Incorrect mesh alignment after extrusion on curved path Thinkurvy 10 1,068 04-17-2024, 10:57 AM
Last Post: _Aka_

Forum Jump: