Example #1
0
    private void Carry(float delta)
    {
        Vector3 d = LiftSystem.CastBoxFromPlayer(CarryDistance);

        LiftSystem.LerpPositionPreview(d, 5f, delta);
        LiftSystem.LerpOrientPreview(Translation, Neck.GlobalTransform.basis.y, 5f, delta);

        if (Input.IsActionJustPressed("interact"))
        {
            LiftSystem.Drop(1f);
        }

        if (Input.IsActionJustPressed("fire1"))
        {
            LiftSystem.Drop(ThrowDropForce);
            LiftSystem.CarriedNode.GetOwner().ApplyCentralImpulse(-ScanRay.GlobalTransform.basis.z * ThrowForce);
        }
    }
Example #2
0
 public override void Interact()
 {
     LiftSystem.Lift(this);
 }