So in my game I assemble a piece of machinery. The issue I’ve been having with two particular pieces is when they attach they start flying around the map together. I assume it has something to do with collisions but I need collisions on in-order to take pieces off again and I believe so the combined structure doesn’t fall through the table. Any idea why actors would start flying all around the map when they attach?
I had a similar problem when I added a turret to a spacecraft using physics for controls. My guess is the addition of the new piece is throwing off their balance. My solution at the time was to turn physics off for one of the actors. You should be able to do this on only the one being ‘attached’ and retain stability of the parent. If you need physics turned back on you can always do so when they are separated again. Otherwise you will need to troubleshoot why the stability is being thrown off and fix it with constraints, which although time consuming is a perfectly valid solution as well. I took this route on a submarine that was having problems when diving and surfacing due to an abrupt interface with its buoyancy component. I had to stop it from rotating in a particular fashion in order to stabilize it.
I’ll try to see if I can find out what’s causing any stability issues on this, its weird because I put a very similar “child” object on the the side of the base object and that doesn’t cause this issue at all? Also, if I manage to catch the combined object before it flys away the process of grabbing and letting go of the combined object seems to fix it. Grabbing mostly just turns physics off for all the connected objects and attaches to the hand then turns it back on and detaches when I drop them.Seems odd that the issue doesn’t happen for all objects because almost all of my objects have nearly identical code
I fixed my issue by disabling “simulate physics” on the parent object then enabling it after it was attached. Not sure why that would even fix it if it was a collision issue, idk, but it works now.