Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Aligning objects from points on spline
#1
Hi, I've decided to change how I move objects on a spline by using two points instead of one so I can increase the precision of the edges of the objects(so they align better with the objects in front/behind of them). I thought of mimicking your train example, but slightly different.

I have the object setup as a prefab with all meshes and stuff as children. My idea is to also create two fixed points, one in front and rear, also as children to the prefab. Then align them to the spline and then place the whole prefab in the center of those two points.
Now the problem. Precision is very important here so I need that once they align to the spline, the world distance that the two points have to each other should be exactly the same as they had to each other in the prefab, before aligning. Placing the first point is no problem, but I have no idea how to get the point on a spline that is X world units, in a straight line, from the first point.

I use Playmaker so I don't need any code, just how to calculate this.

Or, if you have a better way to do this, I would like that instead.
Reply


Messages In This Thread
Aligning objects from points on spline - by Lupp_ - 02-18-2021, 04:08 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  snap to the curve created by the curvy splines segment points ShiroeYamamoto 1 2 2 hours ago
Last Post: _Aka_
  Curvy Line Renderer for UI Spline? gekido 1 1 2 hours ago
Last Post: _Aka_
  Get position of all control points for a spline gekido 1 2 2 hours ago
Last Post: _Aka_
Bug Changing spline connection in inspector causes splines to revert to defaults lacota 3 6 03-18-2024, 07:55 PM
Last Post: _Aka_

Forum Jump: