Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dynamic path
#2
(01-24-2014, 12:08 AM)'savely00' Wrote: Is there a way to pass initial object rotation to make it a curved route , not a straight line without too much calculations?

 

You can set CP rotation easily by altering a CP's transform (access it using mySpline.ControlPoints[x]), but that would only change orientation (=the Up-Vector) of the spline, not the curve itself.
Having a spline with just two CPs will result in a straight line, no matter what. You'll need to tell the spline more about the curvation you want:
  • Let AutoEndTangents enabled and add a CP in the middle that the curve will go through automatically
  • disable AutoEndTangents and use 4 CPs. Set CP 1+2 to your start and end position and use CP 0 and CP 3 to define the curvation
  • Use 2 CPs like now but set Interpolation to Bezier and alter the Handles to define the curve
I guess the first solution would be the easiest calculation wise while the other two gives you total control. What about having 3 CPs with CP0: a previous position of the object, CP1: current position, CP2: target position and starting at TF 0.333 or CurvySpline.SegmentToTF().

Jake
Reply


Messages In This Thread
Dynamic path - by savely00 - 01-24-2014, 12:08 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Duplicate Prefab along path rickgplus 1 1,542 01-23-2025, 10:09 AM
Last Post: _Aka_
  Can't set CG Path Controller j95677 4 3,235 10-04-2024, 06:55 PM
Last Post: j95677
  Scene 51: Dynamic track between two points wallflower6 3 2,477 08-19-2024, 08:18 AM
Last Post: _Aka_
  Disable rebuild of meshes in dynamic mode Zilk1 3 2,240 05-27-2024, 08:14 AM
Last Post: _Aka_

Forum Jump: