- Home /
Question by
king_ · Mar 20, 2014 at 06:34 PM ·
collisionrigidbodycomponentaccessing from any script
how to access GameObject->RigidBody->FixedAngle in a script?
i'm trying to set the FixedAngle of a game object to 'false' after a collision in a script,the script is attached to the gameobject itself. i tried many answered questions but no use..!can anybody help me with this....
Comment
Best Answer
Answer by robertbu · Mar 20, 2014 at 06:35 PM
'fixedAngle is a property of the rigidbody2D, not a Rigidbody. You can set it for the game object the script is attached to by:
rigidbody2D.fixedAngle = false;
this simple,c# seems like hard to learn,but with easy methods like this....man, thank you very much....
Your answer
Follow this Question
Related Questions
Rigidbody necessary to use collision detection 1 Answer
Rigidbody necessary to use collision detection 0 Answers
Deleting a rigidbody 1 Answer
Collider going through walls with box collider.. 1 Answer
Rigidbody not working 0 Answers