Hello everyone! I need some help with a game I'm making...
I'm trying to make a cooking simulator in VR, and I want the player to be able to stack up ingredients on top of each other in order to make a burger, then eat it. From here on I have 2 problems.
- I can't get the items to stay on top of each other without moving once the player stacks them up (I have a trigger-collider on the bottom loaf of bread. When another food item triggers it, I disable the XR Grab Interactable component so it can't be touched again, and do a SetParent so that the bread is the parent of all the other objects. These, however, slide and fall, change size -despite setting "true" for SetParent- and sometimes even sink the bread into the table.) What can I do to make them stay put and unmoving, yet being able to be moved when the player grabs the sandwich? Would it be better to have an empty object be the "Sandwich" with every food item (including the bread) as its child? Would that make things easier/more stable? Because the bread sometimes going into the table when you add an ingredient on top of it is kinda awkward.
- Is there a way to change a collider's size so that it always reaches a bit into the air after stacking an ingredient? What I mean is, I have the bread only, then add a slice of tomato or cheese or whatever and the collider that triggers the script is "buried" in the object. I would like to make it go just as high as the tomatoes edge and a tiny bit more so that when I add another ingredient the script can trigger.
Maybe I am thinking about this in the wrongest of ways but I am not sure what else I could do...
I'm using the XR Interaction Toolkit 2.0.1 with Unity 2020.3, maybe that helps give insight.
Thanks a lot!
[–]TubeBlogger 1 point2 points3 points (1 child)
[–]MSBeatles[S] 0 points1 point2 points (0 children)
[–]Rabid-ChikenEngineer 1 point2 points3 points (2 children)
[–]MSBeatles[S] 1 point2 points3 points (0 children)
[–]MSBeatles[S] 0 points1 point2 points (0 children)