Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ HandPosition

Vector2? Terraria.Player.HandPosition
get

Definition at line 3575 of file Player.cs.

3576 {
3577 get
3578 {
3579 if (mount.Active)
3580 {
3581 Mount.MountDelegatesData.OverridePositionMethod handPosition = mount.Delegations.HandPosition;
3582 if (handPosition != null && handPosition(this, out var result))
3583 {
3584 return result;
3585 }
3586 }
3587 Vector2 vector = Main.OffsetsPlayerOnhand[bodyFrame.Y / 56] * 2f;
3588 if (direction != 1)
3589 {
3590 vector.X = (float)bodyFrame.Width - vector.X;
3591 }
3592 if (gravDir != 1f)
3593 {
3594 vector.Y = (float)bodyFrame.Height - vector.Y;
3595 }
3596 vector -= new Vector2(bodyFrame.Width - width, bodyFrame.Height - 42) / 2f;
3597 Vector2 vector2 = -new Vector2(20f, 42f) / 2f + vector;
3599 }
3600 }
OverridePositionMethod HandPosition
Definition Mount.cs:95
MountDelegatesData Delegations
Definition Mount.cs:507
bool Active
Definition Mount.cs:345
Vector2 MountedCenter
Definition Player.cs:2853
Rectangle bodyFrame
Definition Player.cs:1373
Vector2 RotatedRelativePoint(Vector2 pos, bool reverseRotation=false, bool addGfxOffY=true)
Definition Player.cs:3618