- Home /
Character controler is constantly grounded.
Building in unity for PC and Mac Standalone, using JavaScript; my code that might influence this are:
var controller : CharacterController = GetComponent(CharacterController);
if (controller.isGrounded)
transform.position.y -= 1;
print("We are grounded");
}
Almost directly from the Unity website, and the other bit this is attached to my main camera. The camera has a rigid body, with gravity on. When run, the player spazes in place, and once a button is pressed, immediately falls through the floor until the button is released.
{ CamVec = Cam.position; Camy = Cam.rotation.y; Camz = Cam.rotation.z; transform.position = (CamVec + Vector3(0, -2, 0)); transform.eulerAngles = (Vector3(0, Camy, Camz)); }
This is attached to my capsule, shouldn't be doing much but keeping it next to the camera. bits and pieces... Nothing is parented.
big problem: the player neither is affected by gravity nor collides with the ground.
Your answer
![](https://koobas.hobune.stream/wayback/20220613082211im_/https://answers.unity.com/themes/thub/images/avi.jpg)