I have been struggling with an issue related to attaching actors, which I am calling gadgets, to a car with a weld. The gadgets causing issues sometimes have more complex logic such as a physics constraint that can move back and forth like a piston would. No matter which way I lock the linear limits I always see a very noticeable drag when driving, shown below. My engine version is 5.2.
The intendent behavior of this Piston is to move back and forth on the Z-Axis only but stay put on the X/Y. However, it has this drag even when all axis’s are locked.
My physics constraint has an extremely high strength attempting to keep the position target at 0,0,0. And all linear limits are locked in the case of this screenshot (In the future I would ideally like to limit z motion to move back and forth but even in the case they are all locked this still happens). If I uncheck all position targets this is still happening as well.
Below is the hierarchy of my ‘Piston’ gadget which is basically just a puncher and I want the Head of the piston to move a few units forward based on a physics constraint. Additionally, this works just fine when not attached to a vehicle.
SM_PPiston_Head has simulate physics on and enable gravity set to false (as I do not care about gravity for this demo case) and SM_PPiston_Base does not have simulate physics on as I want it to be attached to my car and stay in the same place the entire game.
The way that I am attaching the gadget to the vehicle (attaching to the SportsCar_Pawn in the demo level, I know spawning an actor to attach it is weird but just isolating this case) is below. Not really sure how much more simple it can get!
I really just want to know, am I doing this right? Is there something I am missing? I have tried attaching these types of gadgets seemingly every which way. Physics Handles, Physics Constraints, Welding and seemingly nothing works. It looks like what’s happening is the weld is not working correctly as the cars physics body is truly independent of the gadgets.
Any help on this would be greatly appreciated!