示例#1
0
 private void TickDragDrop()
 {
     _pickUpObject.SetActorLocation(
         GetCharacter().GetCapsuleComponent().GetWorldLocation() +
         GetControlRotation().Vector() * (DragDropDistance * _dragDistance),
         false,
         new FHitResult(),
         ETeleportType.TeleportPhysics);
 }
示例#2
0
        protected override void ReceiveTick_Implementation(float DeltaSeconds)
        {
            if (bShouldFollowBall && myBall != null)
            {
                var _myPos = MyOwner.GetActorLocation();

                if (_myPos.X >= BallFollowLimitDistance)
                {
                    bShouldFollowBall = false;
                    return;
                }

                var _ballPos    = myBall.MyOwner.GetActorLocation();
                var _xTravelPos = _ballPos.X + DefaultBallFollowOffset;
                //PrintString("Ball Pos: " + _ballPos, FLinearColor.Green, printToLog:true);
                MyOwner.SetActorLocation(
                    new FVector(_xTravelPos, _myPos.Y, _myPos.Z),
                    true, out myHit, false
                    );
            }
        }