Hi, I have been trying to find some help with a method I am writing. What I am trying to acheive is, as a car moves towards its current waypoint the closer it gets the more the wheels point towards the next waypoint so to create a smooth bezier like curve between the current waypoint and the one after…
I have 2 issues, first, how do I pass the returned angle into the _newsteer variable in the ApplySteer() method?
And second is, have I set up the calculation right so the closer to the first waypoint the car gets…the more the wheels will turn towards the next waypoint?
many thanks in advance for any help or guidence :)](Photo Storage))
From that, you can get nice angle
Note, in documentaion from provided link, on the bottom, there is also SignedAngle. Which may be more of use to you.
You basically need use third vector, which is up. See doc.
If you have both method called in same script, you should be able read returned value, and pass it to ApplySteer as argument. In script where you call GetAngle, I assume you got something float angle = GetAngle (...); So you may want to add ApplySteer ( angle ) ; Or something like that.
Feels so much over complicated to me
I mean you got distance division which is fine. But then you got angles acos etc. Which I don’t give my head thinking, what is going on there
Hi no, the code is not mine…I have been trying to frankenstein this method together as am not sure how to construct it…I am very new to c# and trying to learn some more complex stuff…I do understand the basics of what i’m trying to do…I just lack the knowledge of how to properly construct the method