mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-15 21:24:16 +01:00
Add actor rotation
This commit is contained in:
parent
f1b51708b4
commit
2e39dd07e3
3 changed files with 8 additions and 1 deletions
|
|
@ -34,6 +34,12 @@ namespace Dalamud.Game.ClientState.Actors.Types {
|
|||
/// </summary>
|
||||
public Position3 Position => this.actorStruct.Position;
|
||||
|
||||
/// <summary>
|
||||
/// Rotation of this <see cref="Actor"/>.<br/>
|
||||
/// This ranges from -pi to pi radians.
|
||||
/// </summary>
|
||||
public float Rotation => this.actorStruct.Rotation;
|
||||
|
||||
/// <summary>
|
||||
/// Displayname of this <see cref="Actor">Actor</see>.
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ namespace Dalamud.Game.ClientState.Structs
|
|||
[FieldOffset(145)] public byte PlayerTargetStatus; // This is some kind of enum
|
||||
[FieldOffset(146)] public byte YalmDistanceFromPlayerY; // and the other is z distance
|
||||
[FieldOffset(160)] public Position3 Position;
|
||||
[FieldOffset(176)] public float Rotation; // Rotation around the vertical axis (yaw), from -pi to pi radians
|
||||
|
||||
[FieldOffset(0x17B8)] [MarshalAs(UnmanagedType.ByValArray, SizeConst = 28)] public byte[] Customize;
|
||||
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ namespace Dalamud.Interface
|
|||
continue;
|
||||
|
||||
stateString +=
|
||||
$"{actor.Address.ToInt64():X}:{actor.ActorId:X}[{i}] - {actor.ObjectKind} - {actor.Name} - X{actor.Position.X} Y{actor.Position.Y} Z{actor.Position.Z} D{actor.YalmDistanceX}\n";
|
||||
$"{actor.Address.ToInt64():X}:{actor.ActorId:X}[{i}] - {actor.ObjectKind} - {actor.Name} - X{actor.Position.X} Y{actor.Position.Y} Z{actor.Position.Z} D{actor.YalmDistanceX} R{actor.Rotation}\n";
|
||||
|
||||
if (actor is Npc npc)
|
||||
stateString += $" DataId: {npc.DataId} NameId:{npc.NameId}\n";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue