- Home /
This question was
closed Aug 27, 2017 at 02:54 PM by
Hamilcar-games for the following reason:
done
Question by
Hamilcar-games · Aug 16, 2017 at 03:54 PM ·
physicsspeedcarwheelcolliderrigidbody.velocity
How to detect my car is drifting or not ?
I am making a drift game. I want to add score points and compliments on during the car drift. How can i detect now my car is drifting and now my car is going straight i-e not drifting ?
Comment
Start by deciding what you consider to be drifting in real life. Then try to translate those conditions into your code.
$$anonymous$$y guess is the rule you are looking for has to do with the forward velocity in relation to the sideways velocity of rear wheels.
Answer by Welgum · Aug 16, 2017 at 04:41 PM
You can detect the perpendicular velocity of the car's wheels, which means that the car is drifting
Use rigidbody.velocity in local space. I think it might help you http://answers.unity3d.com/questions/193398/velocity-relative-to-local.html