Hi,
I am attaching an actor to a VR motion controller and disabling physics to pick it up and then enabling physics and detaching it to throw it. This works fine except, after the actor is thrown, the component velocity returned from StaticMeshComponent->GetPhysicsLinearVelocity() points in the wrong direction.
Thank you
Attach:
PrimitiveParent->SetSimulatePhysics(false);
GetOwner()->SetActorLocation(NewParentComponentLocation, false, nullptr, ETeleportType::ResetPhysics);
GetOwner()->AttachToActor(UMotionControllerSceneComponent->GetOwner(), FAttachmentTransformRules::SnapToTargetNotIncludingScale);
Detach:
PrimitiveParent->SetSimulatePhysics(true);
GetOwner()->DetachFromActor(FDetachmentTransformRules::KeepWorldTransform);