void AttachToParentWithOldPosition() { var _pinManagerBP = pinManager.MyOwner; FHitResult _hit; FVector _oldLoc = MyOwner.GetActorLocation(); FRotator _oldRot = MyOwner.GetActorRotation(); MyOwner.AttachToActor(_pinManagerBP, _pinManagerBP.GetAttachParentSocketName(), EAttachmentRule.KeepRelative, EAttachmentRule.KeepRelative, EAttachmentRule.KeepWorld, true); MyOwner.SetActorLocation(_oldLoc, false, out _hit, false); MyOwner.SetActorRotation(_oldRot, false); }
void NudgeBallRight(float famount) { FHitResult _hit; MyOwner.SetActorLocation( MyOwner.GetActorLocation() + new FVector(0, famount, 0), false, out _hit, false); if (BallNudgeSound != null) { MyAudioSourceComponent.Sound = BallNudgeSound; MyAudioSourceComponent.Play(); } }
void NewTurnIsReady(EBowlAction _action) { if (MyMeshComponent == null) { return; } MyOwner.SetActorLocation( MyStartLocation, false, out myHit, false ); MyOwner.SetActorRotation( MyStartRotation, false ); MyMeshComponent.SetSimulatePhysics(false); MyMeshComponent.SetSimulatePhysics(true); }