- Home /
Character controller or rigidbody? for skateboard
i new to unity and making games for that matter and want to make a skateboard game but im having real difficulty with getting proper movement like going up ramps etc. im using a character controller but i thought should i use a rigid body instead? will a rigid body align my character to the ramp better? etc.
many thanks.
Answer by Owen-Reynolds · Apr 14, 2013 at 02:43 AM
A charController is specially made to move like a not-realistic standard game person. A rigidbody is for "realistic" rolling.
Set a physics material to be slippery (wheels) and not bouncy (when you land from a jump, you don't bounce off the ground again.) Then set friction2 to be very high going sideways. Maybe a capsule collider with Z locked (the curved front will "climb" better.)
But that will be too realistic. There's no way a rigidbody is going to stick to the top of a railing, rolling down it. At some point you'll have to code hand-movements to work like a skateboard.
thanks for this, i think i will go with the rigidbody, what do you mean by hand movements?
rigidbodies work mainly by using AddForce or setting velocity or angular velocity and letting the physics system move them. Can also temporarily turn off physics and move "by hand" like a character controller -- position = position + move;, like if the player is "locked onto" a railing. Tricks where the human is working extra-hard to force the skateboard in a certain way.
okay thanks, i added the rigidbody with a capsule amd set the anguler drag really high but the character doesnt rotate with ramps and stuff, any ideas?
High angular drag means the object doesn't like to rotate. $$anonymous$$aybe get practice with rigidbodies and physics. Play with a bunch of rigid bodies, read up on the settings, look up Q's about odd settings here (and I'm pretty sure others have asked about skateboards.)
Your answer
Follow this Question
Related Questions
Making character dash forward 0 Answers
2D rigidbody movement & walls 2 Answers
Moving a CharacterController Object together with a RigidBody Object 1 Answer
Top Down Mobile Game movement (rb or CC) 1 Answer
3D RPG Character Movement 0 Answers