- Home /
Question by
jackzhuo · Nov 09, 2020 at 04:46 AM ·
aicar gamecar physicssteering
Car steering to target relative to speed smoothly
I'm try to implement car steering ai currenty, here is the script to calculate the steer(-1,1):
float getSteerInput()
{
Vector3 targetWayPoint = waypoints[currentWaypoint].position;
Vector3 relative = transform.InverseTransformPoint(targetWayPoint );
float targetSteer = relative.x / relative.magnitude;
return targetSteer;
}
but it does not work perfectly, the car just move towards the target; what i want is like following description :
https://gamedevelopment.tutsplus.com/tutorials/understanding-steering-behaviors-seek--gamedev-849
how can i make a car steering relative to speed smoothly ?
Comment
Your answer
Follow this Question
Related Questions
transmission clutch help! 1 Answer
How to make a startline and finishline? I'm making a car game. Help me.!! 1 Answer
Car shifting effect? Help please! 1 Answer
making formations 1 Answer
Car Gearbox script 1 Answer