- Home /
Wheels colliders not moving after apply force to rigibody
I have a problem. I am trying to add reactive engine to my aircraft so it must move on ground on wheels when engines is on (not add torque to wheel colliders). I have game object (aircraft) with rigibody and 3 child game objects: mesh, colliders and wheel colliders. In coolliders I have some gameobjects with box colliders (body, wings, tail etc) and in wheel colliders I have some wheel colliders. When I add constant force to rigibody and put aircraft to some height it falls to ground and starts moving on wheels. But if I let aircraft fall or just put it on terrain before start game and apply my force (turn engines) it dont move and I need to add very big force to move it (really big so aircraft momentally get very big speed). It look like something stops to move wheels when they on ground but when they on air and aircraft has some small speed and height and then hit ground it continue to move and increase speed. Please help me with it.
Answer by joeysipos · Nov 24, 2020 at 03:45 AM
It appears the wheel colliders go to sleep after they stop moving. I fixed this by adding some constant force to the main rigidbody the wheel colliders are attached to.
private void FixedUpdate()
{
if (rb.IsSleeping())
{
rb.AddForce(this.transform.forward * sleepForce);
}
}
Your answer
![](https://koobas.hobune.stream/wayback/20220612145121im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
AddRelativeForce when using wheel colliders? 0 Answers
How to move 2D object on touch in Unity 4.3 1 Answer
How to "Lock" a variable for X seconds 1 Answer
Colliding rigid bodies fly upwards 2 Answers