If I have a physics constraint constraining 2 physics enabled components together, how can I make it so that component 2 follows component 1 (as it normally does) but component 1 does not follow component 2?
E.g. I want them to have more of a parent/child or master/slave relationship rather than an equal one.
For example think of a key constrained to a keyhole, the keyhole is a specific location on a door mesh, if the door moves I want the key to always move with it, but if the key moves I do not want the door to move with it.
I think typically this is based on the “Mass” attribute.
In your example, you’re looking at a door with 22,680g (22.68kg) versus a 10.3g key (according to Google). So the key would have to have either infinite force acting upon it to move the door, or around 2,200 times the amount of force it would take to move the key by itself. That being said, digitally simulating physics in any program is difficult to predict at best.
If it’s two actors, you can simply attach the key at a socket on the static/skeletal mesh of the door and disable physics on the key until it’s removed.
Attaching it to the component and disabling physics isn’t really a good option for me, I need them to be able to collide with each other which requires physics to be enabled, also if I disable physics on the key and put it in the keyhole of the physics enabled door, the door will freak out because of the immovable collidable object embedded in it; and I also wouldn’t be able to move it with a physics handle anymore.
Setting it to soft constraint and disabling projection alleviates the problem a lot.
The first component doesn’t really move as much with the second one if I do this (it still moves with it, just a lot less), but it no longer respects my linear limits properly if I do that although maybe tweaking the stiffness and dampening setting could help with that
Pardon me for referencing my earlier post, but what do your “Mass” variables look like in the physics section of each actor?
Also I’m not suggesting removing physics from the key altogether, but once the key is in place turning off physics and attaching it to the door. But that’s inferring that it doesn’t need to go anywhere after that, right? Then if you need it back, re-enable physics on the key and detach actor from socket/decouple constraint?