|
I am using a rigidbody to model my character. I have to use it because I need full physics. But the problem is that it accelerates/decelerates when moving. Is there a way to avoid this, so it has constant velocity?
(comments are locked)
|
|
You might want to take a look at the RigidbodyFPSWalker script on the Unity Wiki. Tried the project on this wiki. Unity had to rebuild it as it was made on a higher version than my 2.6. Seems to work, partially. FPSWalker does not stop moving after a certain amount of 'walking' it... and the direction keyboard keys no longer match the direction the FPS takes on... FPS rapidly falls off the platform to infinity. Will make platform huge to see if I can get a feel for the behavior of the FPS.
Jul 11 '10 at 02:26 PM
dingben
Was losing the capsule(FPS) in the hierarchy? ...renamed all the cubes 00,01,02,... 10. When hit 'play' the capsule becomes child to cube10(non-terrain-floor)... while using arrow keys to move around, the FPS changes shape and also builds up large speed in any one direction that cannot be compensated by the arrows action... and poof we go to infinity. Don't know if it is due to Unity (versions)conversion or bad C# script... I use javascript, can't comment further until I have had a chance to translate the C# to javascript
Jul 11 '10 at 04:47 PM
dingben
(comments are locked)
|
|
directly controling Velocity ;)
(comments are locked)
|
|
It may not be the Character Controller see
(comments are locked)
|
|
you can have constant velocity by disabling friction and drag and setting the velocity of the rigidbody directly to a value. you should not aply forces and you should just use the velocity property and set it to the value that you want. generally it's not a good idea to make your character move in this way. you should use ragdolls when you need physics and use character controllers when you don't need it. simulating human movements with physics is not an easy task and it will become very heavy. there is a great video about physics in unite 08. one of the problem that is described there is "character simulation using ragdolls or rigidbodies". hope this helps
(comments are locked)
|
