Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Closest Point on Spline (+Offset) to some World Position
#7
EDIT: Fixed the issue, but leaving here just in case someone else runs into it

Hey Aka,

So the lane position code works great. I'm having a bit of an issue with the GetNearestPointTF though. Just using this code:
[Image: 93fF2NA.png]


I'm doing a straight road starting at z = 0 and going to z = 1000 for just a validity test. It seems like carTf is not increasing linearly. CarTF starts out higher than the position on the road, at z=500 it matches up, and then the back half, the carTf is lower than the actual road position, and lines up at the very end.

I don't have the car starting at z=0 but I imagine it would match up there too, and then increase faster.

I took a video here to kind of show what's going on:
https://youtu.be/UMbNZI5NZVY


Hopefully this is just in "stupid mistake on my part territory" but the code is one line and from you, but maybe I missed a spline setting somewhere :p

Thank you!

And yes, I have a feeling that I'll be very active on these forums. I don't generally like to use 3rd party solutions for core systems (other than one-off art or FX things) because stuff can get abandoned etc (I'm SO happy with how you guys decided to transition) - but Curvy fits the game so well and will be an integral part of the game. I'm happy to include it in media / promotions , trailers "Made Possible With Curvy" etc and shout it from the rooftops in exchange for support or possibly maybe custom features (can't think of any atm, but I'm sure I will during development)

[Image: 2Kg3IyA.png]
[Image: CjJ3qTF.jpg]
Reply


Messages In This Thread
RE: Closest Point on Spline (+Offset) to some World Position - by nomadigi - 01-25-2018, 02:15 AM

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

Forum Jump: