Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
locking vertical orientation/alignment
#1
Hi,

I tried all the orientation options but am struggling to find the right setting.

I have a flying machine following a spline, and I want it to align with the spline
tangent in the x z plane, but I need to lock the y orientation.

I hope that's straightforward ?

Thanks,
Ben
Reply
#2
Hi
Right now controllers can't follow a path only on specific translation/rotation dimensions. That's a feature that I am planning to include in the next major update. Until then, you can implement a solution to your specific use case by inheriting from the Spline Controller class. Override the ComputeTargetPositionAndRotation method by making sure the computed up vector is ignored and replaced by the locked y direction you want. Do you see what I mean?
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#3
(02-17-2021, 11:05 AM)_Aka_ Wrote: Hi
Right now controllers can't follow a path only on specific translation/rotation dimensions. That's a feature that I am planning to include in the next major update. Until then, you can implement a solution to your specific use case by inheriting from the Spline Controller class. Override the ComputeTargetPositionAndRotation method by making sure the computed up vector is ignored and replaced by the locked y direction you want. Do you see what I mean?


Thank you for your reply !

I just had a look into the controller script, and found it starting at line 537 -
but I am pretty new to coding so might take me a while to find the 
lines that I would have to change and how, but will try.

The reason for wanting to constrain the vertical orientation is that the machine takes off quite steeply, 
which tilts it and is a bit uncomfortable when you are inside in VR!

Regards, 
Ben
Reply
#4
if you are struggling with it, let me know and I will send you the modified code soon
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to rotate orientation? ahkow 3 253 12-09-2020, 04:49 PM
Last Post: _Aka_
  Mesh Lines - Horizontal and Vertical Edges Krypton 14 1,610 09-23-2020, 02:16 AM
Last Post: Krypton
  How do join 3 splines && Orientation problem athos_k 3 1,003 07-09-2020, 10:41 AM
Last Post: _Aka_
  Sync orientation at connection points (Dynamic)) ATHellboy 1 1,035 02-05-2020, 09:47 PM
Last Post: _Aka_

Forum Jump: