- Home /
Question by
Posly · May 23, 2012 at 08:29 PM ·
rigidbodycollidercharactercontrollerjumping
attached.Rigidbody isn't working with a ChactacterController?
I'm trying to make my player jump with "rigidbody.AddForce". I have a charactercontroller and a rigidbody on my player.
First I tried just using "rigidbody.AddForce", but nothing happened.
var jumpSpeed : float;
function Update () {
if(Input.GetButton("Jump")) {
rigidbody.AddForce(0,jumpSpeed,0);
}
}
Next I tried using "collider.attachedRigidbody.AddForce", but still nothing is happening.
var jumpSpeed : float;
function Update () {
if(Input.GetButton("Jump")) {
collider.attachedRigidbody.AddForce(0,jumpSpeed,0);
}
}
Am I missing something?
Comment
Your answer
Follow this Question
Related Questions
Picking up items with Rigidbodies 2 Answers
How to make jump something without using a character contoller? 2 Answers
Using isGrounded with a RigidBody 2 Answers
Why isn't my character jumping?? 1 Answer
Why can't I properly jump? 2 Answers