I am working on creating a physics-based bicycle for my game, and I am just focusing on the front wheel and handlebars for this question. The wheel is constrained by a physics constraint to the front (aka handlebars).
The wheel was parented to the front fork to maintain its rotational offset so that when the handlebars turn, the wheel will remain centered on the fork. Through my searching, I found that when an object is marked for physics simulation, it gets rid of its parent at run time, making it so that while it will still rotate, it will not be correctly centered. The top video is what it should look like, and the bottom video is what it currently looks like. I also included images.
I might be looking at this the wrong way in terms of finding a solution, but I’m stumped as to how to proceed. Any suggestions would be greatly appreciated. Thanks!
Having a physics-simulated object rotate with its parent requires careful management of both the physics engine and the parenting relationship. Typically, this involves setting constraints or synchronizing the object’s rotation to ensure it follows the parent’s movements accurately without disrupting the physics simulation. Stardew Valley APK players, this concept parallels managing the interdependencies in your farm, where adjusting one element, like crop rotation, impacts the overall success, much like ensuring synced rotations in game development keeps everything running smoothly.
Interesting project! It sounds like the physics simulation is breaking the parent-child link between the wheel and fork at runtime. Maybe try using a physics constraint that specifically locks the wheel’s position relative to the fork, not just its rotation? Hope you find a smooth solution!