Kinematic sphere doesn't move
Hi! I'm still working on my app. I have this problem: I'm working with Leap Motion, so I use both hands as cursors. I use "CleanRobotFullRightHand" and the other. I have added to the skeleton of the hand (specifically, at the end of the middle finger) an sphere, with a rigid body. Firstly, it's disabled and IsKinematic = true. The fact is that when LeapMotion recognize a gesture (it's already developed), it has to throw the ball straightforward, so I use this: public GameObject esph; public Rigidbody rigidEsph;
public void Start(){
esfera = cuerpoEsfera.gameObject;
esfera.SetActive (false);
rigidEsph.IsKinematic = true;
}
....
public void shot()
{
esfera.SetActive (true);
cuerpoEsfera.isKinematic = false;
cuerpoEsfera.AddForce (transform.forward * 200);
}
Why doesn't the ball move itself?
Thanks in advance!
Answer by JonathanCzeck · Nov 30, 2015 at 07:54 PM
Perhaps it is moving but the force applied is too small to make it go faster than the sleep velocity set in Physics system? Try doing:
cuerpoEsfera.AddForce (transform.forward * 200, ForceMode.Acceleration);
Also, are you calling your object esph and rigidEsph, or esfera and cuerpoEsfera? Your code and what you wrote in your question don't match. Are you sure you're referencing the correct variables?
Your answer
Follow this Question
Related Questions
AddForce and Momentum 1 Answer
Rigidbody is colliding terrain on isKinematic = false. call although meshes don't touch 0 Answers
How to check if kinematic rigidbody is overlapping anything in the scene? 0 Answers
How can I turn a sphere with the mouse while using normal controls to move it? 0 Answers
[SOLVED] Ball rolling around a planet bounces off? 2 Answers