- Home /
Spin non kinematic object ?
i have a projectile that spins when the player holds it (kinematic is set to true) , but when the player shoots the projectile (kinematic is set to false) but when its shot , it stops spinning , how do i keep it spinning even in non kinematic state ?
void Update()
{
rb.MoveRotation(rb.rotation + revSpeed * Time.fixedDeltaTime);
}
void OnMouseDown()
{
IsPressed = true;
rb.isKinematic = true;
}
void OnMouseUp()
{
rb.MoveRotation(rb.rotation + revSpeed * Time.fixedDeltaTime);
IsPressed = false;
rb.isKinematic = false ;
StartCoroutine(Release());
}
Answer by hilfygame-studio · Feb 19, 2020 at 10:19 PM
just rotate with
"transform.Rotate(1, 1, 1, Space.Self);"
change the 1,1,1 to whatever X, Y, Z you need and done
the projectile falls , it was supposed to be in its place and when the player drag it down and shoots it it starts to rotate , and what u said makes the object fall when the game starts , thank you , its a bit like angry birds , that might get the idea close
Your answer
![](https://koobas.hobune.stream/wayback/20220612223642im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
2d kinematic projectile velocity problem 0 Answers
2D rigidbody velocity relative to rotation? 0 Answers
CharacterController gets pushed by RigidBodies 1 Answer
How do I collide a Kinematic sprite ? 0 Answers
Kinematic rigidbody movement. 2 Answers