Having trouble applying local force using world coordinates (pics included)
I have a pawn that's aiming to have 6DOF with physics based movement. I've implemented vertical, strafe, and forward motion and all their forces are correctly aligned with local coordinates like so:
It's lack of wobbling also confirms that the pawn's origin and center of gravity are aligned.
For yaw, pitch, and roll, I want to apply a force a consistent distance (in this case, 100m either forward or above the model) to make it turn.
As a starter I have a constant force being applied towards the right, 100m fore of the model, which should make it yaw right. However best case it ends up wobbling off-axis uncontrollably. Worst case it radically changes direction every few seconds. I changed the 100m vector to 0 so that it should act the same as Add Force for strafing, but it still wobbles in an inconsistent manner. The wobbles are the same as what my vertical, strafe, and forward blueprints did before I got them using the right transforms.
I've tried Add Force at Location, Add Force at Location (Local), Add Torque, and every combination of Inverse Transform, Transform, Invert Transform, Get Relative Transform, Get Actor Forward/Right/Up Vector with no solution. Tried the following example blueprints:
and several others. I removed the strafe, vertical, fore Force section of the blueprint in case anything there was throwing it off but still no dice.
asked Sep 26 '18 at 11:07 PM in Blueprint Scripting
Solved it myself. Turns out the issue was that UE4 think the CoM is different from what 3dsmax does. Add Force automatically aligns itself with the CoM rather than the mesh origin. Once I accounted for it it was fixed.
answered Sep 28 '18 at 08:03 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here