- Home /
Trying To Make Burger Builder
Hello! I am looking to create a part in my vr game where you put the ingredients of a burger together to serve to customers. I have tried using fixed joints, and they do work to connect ingredients, but they seem to break when I try to move them, always snapping back to where they started. I was wondering if there was any other solution?
Answer by Captain_Pineapple · Apr 19 at 04:50 PM
Have you considered to simply assing the next ingredient as child of the previous one?
So something like:
   //attach patty on top of Bun:
   Patty.transform.parent = Bun.transform;
   //add a slight offset to make it appear on top but in relation to the bun:
   Patty.transform.localPosition = Vector3(0,0.1f,0);
   //attach Salad on top of Patty:
   Salad.transform.parent =  Patty.transform;
   //again, add an offset:
   Salad.transform.localPosition = Vector3(0,0.01f,0);
Code ofc just an example to try and explain what i mean by setting things as children. You'll have to mash this into your existing code.
Your answer
 
 
             Follow this Question
Related Questions
ConfigurableJoint Target Position/Rotation Issues? 1 Answer
How to go about filling the gaps between segmented objects connected with hinge joints? 0 Answers
Why does unity combine Y and Z angular drive in configurable joints? 0 Answers
Help Setting Configurable Joint Target Rotation to a child transform's rotation 0 Answers
Need help with configurable joint (VR Pickupable like shopping bag) 0 Answers
 koobas.hobune.stream
koobas.hobune.stream 
                       
               
 
			 
                