1
This commit is contained in:
@@ -35,6 +35,19 @@ namespace BITFALL.Entities.Player.Movement
|
||||
|
||||
[SerializeField] private Transform fpvPoint;
|
||||
|
||||
public Vector3 Position
|
||||
{
|
||||
get => actor.Position;
|
||||
set=>actor.Position = value;
|
||||
}
|
||||
|
||||
public Quaternion Rotation
|
||||
{
|
||||
get => actor.Rotation;
|
||||
set => actor.Rotation = value;
|
||||
}
|
||||
|
||||
public Vector3 Forward => actor.Forward;
|
||||
public Vector3 ViewCenter { get; set; }
|
||||
public Quaternion ViewRotation { get; set; }
|
||||
public Vector3 LocomotionBasedVelocity { get;private set; }
|
||||
@@ -230,6 +243,11 @@ namespace BITFALL.Entities.Player.Movement
|
||||
return;
|
||||
}
|
||||
|
||||
if (MovementInput.x is not 0 && MovementInput.z is 0)
|
||||
{
|
||||
TransitionState<Dodge>();
|
||||
return;
|
||||
}
|
||||
if (climbClosePoint.TryGetClosePoint(out var closePoint))
|
||||
{
|
||||
ExpectClimb.shouldBe = closePoint;
|
||||
@@ -345,15 +363,15 @@ namespace BITFALL.Entities.Player.Movement
|
||||
case < -16:
|
||||
entity.Invoke<DamageMessage>(new DamageMessage()
|
||||
{
|
||||
damage = value < -30 ? int.MaxValue : (int)math.abs(value) * 2 ,
|
||||
damageType = new GravityDamage(),
|
||||
location = new Location()
|
||||
Damage = value < -30 ? int.MaxValue : (int)math.abs(value) * 2 ,
|
||||
DamageType = new GravityDamage(),
|
||||
Location = new Location()
|
||||
{
|
||||
position = actor.Position,
|
||||
rotation = actor.Rotation
|
||||
},
|
||||
initiator = entity,
|
||||
target = entity,
|
||||
Initiator = entity,
|
||||
Target = entity,
|
||||
});
|
||||
break;
|
||||
}
|
||||
@@ -393,7 +411,8 @@ namespace BITFALL.Entities.Player.Movement
|
||||
|
||||
ViewRotation = rotation;
|
||||
|
||||
ViewCenter = additiveTransform.position + additiveTransform.forward;
|
||||
//ViewCenter = additiveTransform.position + additiveTransform.forward;
|
||||
ViewCenter = additiveTransform.position + Quaternion.Euler(LookInput) * Vector3.forward;
|
||||
}
|
||||
private float _stamina = 100;
|
||||
public float Stamina
|
||||
|
Reference in New Issue
Block a user