Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Angle detection by tangent
#2
Hi,

Is your project anything like Micro Machines? It looks cool, and I would like to learn more about it.

Regarding your code, there might be different sources for the issue:
  1. I would recommend using Vector3.Project to project vectors instead of manipulating their individual components. You can project your vectors on plane which normal is the spline's orientation, given by CurvySpline.GetOrientationUpFast
  2. Vector3.Angle returns an unsigned angle; you might want to use Vector3.SignedAngle a signed one.
  3. Know that the GetTangent and GetOrientationUpFast methods have an optional parameter allowing you to retrieve the tangents either in local space or global space.

With this information, I hope that you will be able to debug your code. If needed feel free to ask for more clarification.
Have a nice day
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Reply


Messages In This Thread
Angle detection by tangent - by Skuuulzy - 11-18-2024, 11:31 AM
RE: Angle detection by tangent - by _Aka_ - 11-18-2024, 04:30 PM
RE: Angle detection by tangent - by Skuuulzy - 11-20-2024, 02:38 PM
RE: Angle detection by tangent - by Skuuulzy - 11-20-2024, 03:59 PM
RE: Angle detection by tangent - by _Aka_ - 11-21-2024, 08:40 AM
RE: Angle detection by tangent - by Skuuulzy - 11-21-2024, 02:38 PM
RE: Angle detection by tangent - by _Aka_ - 11-22-2024, 10:47 AM
RE: Angle detection by tangent - by Skuuulzy - 11-27-2024, 01:20 PM
RE: Angle detection by tangent - by _Aka_ - 11-28-2024, 09:13 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Bug Corner Angle Revisited SAMYTHEBIGJUICY 10 6,151 01-02-2024, 10:12 AM
Last Post: _Aka_
  How can I find the point on the spline after applying with offset angle+radius? Chanon 1 1,443 10-01-2022, 11:50 AM
Last Post: _Aka_
  Tangent incorrect. tairoark 3 2,517 06-28-2022, 06:31 PM
Last Post: _Aka_
  Make hard angle cll3m 5 4,343 07-01-2021, 04:06 PM
Last Post: _Aka_

Forum Jump: