- Home /
How to glue multiple objects together
Hi, I wanted to know if there is a way to "glue" different objects together. I have different items in the scene: base figures (cubes) and simple "custom" mesh (tethraedron, pyramids, something of that kind). I want a way to hold these items together so that if I apply a force to one it doesn't move away from the rest of the items, but move the whole group instead, making it move / rotate accordingly. Thank you!
transform.parent = (the same thing as the others)
Edit: converted to comment
this does work in editor, but will it work with physics too? I'm doing some simple tests (cube faling with gravity) and it seems to me that they act kinda independently anyway
Sorry I didn't see "rigidbody" (but I do now see 'force' which implies that); search UA/Google for any number of examples
Google: unity group rigidbodies together
You may be able to use Joints. Take a look at the FixedJoint class.
I'll take a look at joints. I'll let you know if it does the trick. Thank you!
EDIT: IT seems like it's working, thank you!
Your answer
Follow this Question
Related Questions
combining meshes 0 Answers
Rigidbody SweepTest doesnt work for mesh collider? 2 Answers
Catapult question 2 Answers
Generate Bounding Box, In Game 1 Answer