Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to get direction of last control point?
#1
I'm creating a spline by "drawing" it, like in the PaintSpline example scene, but modified it a bit so that my mouse is always controlling the last point so it is smooth. 

I need to have an object at the end of the line always point in the direction of the last spline control point based on the curve direction too. But it seems as though the control points don't change rotation based on direction.  

Any idea how I can accomplish this?

I was thinking if there's a way to get the last control points "handle in" position, I could get a direction vector by comparing that with the current control point (last one). But not sure how to do this.
Reply


Messages In This Thread
How to get direction of last control point? - by _RicO - 04-06-2023, 05:02 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Get position of all control points for a spline gekido 1 2 Yesterday, 10:08 PM
Last Post: _Aka_
  Avoiding runtime GC allocations on control point position change Ell223 8 18 02-24-2024, 10:43 AM
Last Post: _Aka_
  Connection "next' control point jh092 3 15 11-22-2023, 11:47 AM
Last Post: _Aka_
  Spline.Length not updated unless I add a point to spline (or modify it) first. _RicO 3 6 08-26-2023, 08:41 AM
Last Post: _Aka_

Forum Jump: