It seems that it’s impossible to change the location and rotation of an actor whose components are simulating physics. In my case, I have a skeletal mesh component as the root. When I try to alter the location and/or rotation, it will only work if physics simulation is disabled for the mesh component.
This is true even with SetWorldLocationAndRotationNoPhysics on the component, which is described as being a method that does not affect physics, as well as TeleportTo on the actor itself.
/**
* Set the position of all bodies in this component.
* If a SkeletalMeshComponent, the root body will be placed at the desired position, and the same delta is applied to all other bodies.
*
* @param NewPos New position for the body
*/
virtual void SetAllPhysicsPosition(FVector NewPos);
/**
* Set the rotation of all bodies in this component.
* If a SkeletalMeshComponent, the root body will be changed to the desired orientation, and the same delta is applied to all other bodies.
*
* @param NewRot New orienatation for the body
*/
virtual void SetAllPhysicsRotation(FRotator NewRot);
Hey guys… what happened to the implementation of GetPhysicsLocation? The git link above no longer works…
I am in need of getting the position and rotatien of a physics-enabled object.