- Home /
Performance Issue with RigidBody2D
Hi,
I have a gameObject that has a rigidbody2D and also a circleCollider2D which is not "IsTriggered". Right now i'm moving and rotating this gameobject using transform.traslate,transform.forward,transform.rotation and other functions in transform class.
My question is : Is it good for a game object that has a rigidbody2D and a circleCollider2D to be 1-move and 2-rotate it with transform class(like transform.forward , transform.rotate . transform.translate etc. ? Hope you understand what i,m saying . My english isn't really good, so I apologize for any mistakes.
Answer by MelvMay · Aug 13, 2015 at 10:16 AM
If you are doing this then set the Rigidbody2D property of 'IsKinematic' to true otherwise it will be a dynamic rigid-body which should not be moved via the Transform component.
i need to set the transform.forward of the gameobject so that the gameobject faces against another gameobject.The problem is that i have no choice but to use transform.forward . What should i do in this case?
i suggest having a child game object which holds the graphic of your game object which you can flip or rotate.
Your answer
Follow this Question
Related Questions
Transform.position.x jumps to high numbers after collision 1 Answer
rotate 2d object without affecting the rigidbody ? 1 Answer
Why is constructing a cube from 6 faces so much slower? 1 Answer
Why Rigidbody2D gameobject automatically translating to Vector2.zero itself 1 Answer
What is equivalent to Transform.up when moving and rotating the RigidBody2D component instead? 1 Answer