- Home /
How to Access GameObject.collider.cente in #pragma strict
Using normal Java in Unity
GameObject.Find("Body").collider.center = Vector3(0,0,0);
How do I do it in Java with #pragma strict?
Comment
Answer by Lttldude · Apr 25, 2012 at 09:57 PM
This should work:
GameObject.Find("Body").collider.bounds.center = Vector3(0,0,0);
Tell me if you still have trouble. Good luck.
Your answer
Follow this Question
Related Questions
Move sprite depending on its collider position 1 Answer
How would i find the center of an object with a Y axis offset to find the center on the top face? 1 Answer
FPS collider center offsets camera pivot? 0 Answers
How to get center of collider in hierarchy 3 Answers
How to get the center of a collider face and the halfExtents to the corners of that face? 0 Answers