Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Steer Towards Spline
#1
I have a manual user controlled vehicle that a user will drive down a road created with a Curvy volume extrusion. When the user is not moving the horizontal axis (Steering), I would like to auto-steer the vehicle to be parallel with the underlying spline. I have tried several things and would appreciate your input as to the best way. Firstly, I use GetNearestPointTF(vehiclePosition) and interpolate the world position and can place marker in the correct GOAL position. Where I am stuck is figuring out the rotation that an object following the path at GOAL position would have? An approach I tried is to attach a VolumeController to a DEBUG object and attempt to set its .Position property to the TF value from GetNearestPointTF(vehiclePosition) above. Then, I could use this object's rotation as the "ideal" rotation at this point. However, setting .Position to the same TF value used to place the GOAL object above lags way behind the object. The farther away from start I get, the more behind the position is. So, what am I doing wrong with the .Position setting and, is there a whole lot better and easier way to accomplish this?
Reply


Messages In This Thread
Steer Towards Spline - by whitecastleroad - 08-30-2019, 05:00 PM
RE: Steer Towards Spline - by _Aka_ - 08-30-2019, 06:33 PM
RE: Steer Towards Spline - by whitecastleroad - 09-03-2019, 10:51 PM
RE: Steer Towards Spline - by _Aka_ - 09-04-2019, 01:39 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Curvy Line Renderer for UI Spline? gekido 3 6 04-04-2024, 12:56 PM
Last Post: _Aka_
  Get position of all control points for a spline gekido 1 6 03-28-2024, 10:08 PM
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_
  GO can't fit end of the spline GameDeveloperek4123 3 14 03-04-2024, 11:06 AM
Last Post: _Aka_

Forum Jump: