Hello everyone,
I am currently building an experimental room using Unity. Any help would be appreciated, or even compensated!
🔵 Context:
In the room there will be some 'LEGO' like bricks on a table, and people will be asked to build a model. I am currently working on the CODE for the snapping mechanism, but I am having problems since I am using the XR toolkit for grabbing.
Ideally, the bricks should have the same behavior as in real life (that is, any top stud should be able to connect to any bottom snapping point).
I used empty game objects in the positions where I want the snap to happen. Currently, I have been able to make the bricks snap in the correct place, but I have some questions:
🤔 Questions
- What is a good way to make bricks move together after snapping? I tried making them parent of each other, but kinematics/gravity are then only possible for the parent object, and I can't grab the other object. The best solution so far is using 'joints', but this makes the bricks not fixed but rather 'flexible'.
- After snapping, I should be able to break the snap once 'isGrabbed' is true on both bricks, and I pull them apart. How can I implement this?