CharacterController questions
Posted: Wed Oct 24, 2012 12:41 pm
I started using CharacterController from the demo in order to have physics based movement in the game. The first thing I did is replace my camera with the one from the demo. This was problematic and took some time and even now is not working quite properly. Raytracing from camera position/direction is broken. Then I added a CharacterControllerInput and after calling activate, it pretty much worked as expected. I did get suck one in terrain though once.
So here are my questions:
1. I am supposed to use character.CharacterController.StanceManager.StandingHeight to determine the cylinder height and character.CharacterController.BodyRadius for the cylinder radius? The top of the cylinder should be the top of the characters head, because when jumping you want to avoid the eye level getting up to/past the roof. How do you do this? With character.StandingCameraOffset? What kind of values does that take?
2. In order to increase the jump distance, I modified character.CharacterController.JumpSpeed *= 10. What is character.CharacterController.JumpForceFactor used for?
3. How to change the movement speed? After I activate the controller, the camera speed is ignored and I can't seem to change it anymore. Deactivating the controller makes the camera move at the desired speed again.
4. How to create a controller that flies around like a camera, but with collision so the cylinder does not clip thought items? Basically behaving like a normal controller without gravity?
5. How to control the force with which the controller interacts with the surroundings. And is it possible to make it so that it does not interact with some items, like some small items on the floor that I don't want pushed around by walking?
So here are my questions:
1. I am supposed to use character.CharacterController.StanceManager.StandingHeight to determine the cylinder height and character.CharacterController.BodyRadius for the cylinder radius? The top of the cylinder should be the top of the characters head, because when jumping you want to avoid the eye level getting up to/past the roof. How do you do this? With character.StandingCameraOffset? What kind of values does that take?
2. In order to increase the jump distance, I modified character.CharacterController.JumpSpeed *= 10. What is character.CharacterController.JumpForceFactor used for?
3. How to change the movement speed? After I activate the controller, the camera speed is ignored and I can't seem to change it anymore. Deactivating the controller makes the camera move at the desired speed again.
4. How to create a controller that flies around like a camera, but with collision so the cylinder does not clip thought items? Basically behaving like a normal controller without gravity?
5. How to control the force with which the controller interacts with the surroundings. And is it possible to make it so that it does not interact with some items, like some small items on the floor that I don't want pushed around by walking?