- Home /
Elevator vibrating!!!
Hi everybody. Here i found a terrible problem. I made a custom elevator with some simple 3d objects. Parented all the retail objects under the *Elevator gameobject and made it a single prefeb. Then add a simple animation and some simple codes that moved it. Then i scripted my character with simple codes. Whenever my character is on the elevator and press the trigger, the elevator start moving. BUT THE PROBLEM IS, IT MOVES WITH VIBRATION. I have added rigidbody to my player. Whenever i deselect the rigidbody, the Elevator moves smooth. But as soon as i reselect rigidbody, the Elevator again start vibrating. I want to run my elevator even if my character has rigidbody attached with it. How to fix this???
@applemaniac no. Rigidbody is attached to the player only.
$$anonymous$$aybe it has a collider ? try to change the method of colliding in the options
Place your camera on the elevator. This way you can really see if its the elevator vibrating.
If your camera is tethered to your player it is likely your player vibrating.
It has a rigidbody so the upward force of the lift is projecting the player upwards, then he comes back down with gravity. Rinse and repeat. ie he is not moving at the same rate as the lift, he is a pingpong ball on a giant bat.
Answer by inafield · Jul 03, 2015 at 07:33 AM
Rigidbody is on the player. Therefore gravity is acting on the player. The player is acting on the elevator. Therefore gravity is acting (albeit intermittently) on the elevator by way of the player.
When you press the trigger, first turn off the rigidbody, then start the elevator movement. Turn the rigidbody on after the elevator has stopped moving and before the user can regain control of the player.
Um, that make sense, at least in some cases. Thanks by the way.
Your answer
![](https://koobas.hobune.stream/wayback/20220613201309im_/https://answers.unity.com/themes/thub/images/avi.jpg)