Acceleration in Unity

后端 未结 4 1835
予麋鹿
予麋鹿 2021-02-20 04:38

I am trying to emulate acceleration and deceleration in Unity.

I have written to code to generate a track in Unity and place an object at a specific location on the trac

4条回答
  •  我寻月下人不归
    2021-02-20 05:36

    You could try work with the wheelcollider tutorial they have for their wheel system.

    It has some variables you can adjust along with the Rigidbody variables to achieve simulated driving.

    As they write

    You can have up to 20 wheels on a single vehicle instance, with each of them applying steering, motor or braking torque.

    Disclaimer: I have only minimal experience working with WheelColliders. But they seem like what you're looking for to me.

    https://docs.unity3d.com/Manual/WheelColliderTutorial.html

提交回复
热议问题