void USCarryObjectComponent::OnRotateMulticast_Implementation(float DirectionYaw, float DirectionRoll) { AActor* CarriedActor = GetCarriedActor(); if (CarriedActor) { /* Retrieve the object center */ FVector RootOrigin = GetCarriedActor()->GetRootComponent()->Bounds.Origin; FRotator DeltaRot = FRotator(0, DirectionYaw * RotateSpeed, DirectionRoll * RotateSpeed); RotateActorAroundPoint(CarriedActor, RootOrigin, DeltaRot); } }
void USCarryObjectComponent::OnRotateMulticast_Implementation(float Direction) { AActor* CarriedActor = GetCarriedActor(); if (CarriedActor) { /* Retrieve the object center */ FVector RootOrigin = GetCarriedActor()->GetRootComponent()->Bounds.Origin; FRotator AddRot = FRotator(Direction * RotateSpeed, 0, 0); RotateActorAroundPoint(CarriedActor, RootOrigin, AddRot); } }