コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }