Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
best way to rotate, change offset, and inset position of splinecontroller object
Hi, apologies if this is a simple question but I searched the forums and checked the youtube tutorials and saw nothing.

For an object with a SplineController component, when Orientation is enabled you can use Offset to change the local vertical distance from the Spline. Especially since I'm using a Generator this is great so I can use Offset like a local Y position for the object. However in some instances I would like to have manual control over the rotation of the object, but the only way to do that is to disable Orientation and unlock rotation. When Orientation is turned off, you no longer have access to Offset so in my case the object is set to the position of the TF point on the path, inside of the generated mesh, which is my problem. 

So my goals are to 
1. be able to manually set the vertical distance from the spline
and at the same time,
2. be able to manually control the rotation of the object.

3. Also, I'm curious how to set the inset/cross/perpendicular position of a SplineController object on the path. I'd like to have the object more towards the edge of the generated mesh rather than the center. Is Offset Angle the only way to do this? This is a little troubling because at maxxed out values it also lowers the object to be the same height as the path (under the mesh in my case). Any recommendations on controlling this position? 

Thank you!

1. and 2. If you go to CurvyControlle.ShowOffsetSection, and set its return value to true, you will have the offset feature always available. But the result might not be what you want. If that is indeed the case, you can either modify SplineController.ComputeTargetPositionAndRotation, or make your own controller that would inherit from SplineController and override its ComputeTargetPositionAndRotation method. In that method, the controller gets the spline data and returns the position and orientation the controlled object should have. By modifying this code, you can implement your custom behaviour.

3. Modifying ComputeTargetPositionAndRotation would be the solution for this too.

Did this help?
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
  How can I find the point on the spline after applying with offset angle+radius? Chanon 1 3 10-01-2022, 11:50 AM
Last Post: _Aka_
Photo Position in Input Spots not working on all directions. Mike Danielsson 2 9 09-03-2022, 02:22 PM
Last Post: Mike Danielsson
Brick Delete CurvySplineSegment from the start of a Spline causes UV's to change studentloan 5 7 06-14-2022, 03:14 PM
Last Post: _Aka_
Exclamation Runtime error when using Curvy Generator with Game Object Deform studentloan 3 13 04-22-2022, 09:00 PM
Last Post: _Aka_

Forum Jump: