As part of a project I'm doing, I need to model a ball with three accelerometers attached to it in Unity. To do this I've created a sphere that can be controlled through keyboard input, and attached three very small cubes to it at different points. I need to collect the positions and angular velocities of all four objects. Collecting the angular velocities require me to attach a rigid body component to each object, which prevents me from making the cubes children of the sphere. However, I would still like to attach the cubes to essentially be fixed at some point on the surface of the sphere. But how can I do this? For placing the cubes I've been messing the Transform section of each cube object in the inspector but this hasn't worked out well. Is there a way to pick the position, through a script attached to each cube, relative to the spheres local coordinates? As for fixing the cubes in place, I've been forced to use the hinge component since I can't make the cubes children of the sphere. I have some doubts about this, so I'm just wondering if using the hinge component is an ok way to attach one object to another, so that they essentially move together while still being independent to a degree? I appreciate any help or advice that you can offer, so thanks in advance!
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
359 People are following this question.
Enemy is following my player but dont stop
Select GameObjects in a Box Range
How to take user input, convert it integer, and print it on screen?
OnTriggerEnter Footsteps Multiple Times A Second
Multiple Tags with FindGameObjectsWithTag...?