Skip to content

feat: add decoded members for IPlacedComponent#191

Draft
poirierlouis wants to merge 2 commits into
wopss:masterfrom
rayshader:feat/iplacedcomponent
Draft

feat: add decoded members for IPlacedComponent#191
poirierlouis wants to merge 2 commits into
wopss:masterfrom
rayshader:feat/iplacedcomponent

Conversation

@poirierlouis

Copy link
Copy Markdown
Contributor
  • types and offsets of lastPosition/position is sure but names is a best guess effort
  • ChildBinding might contain Handle and/or WeakHandle, needs runtime check
  • DynArray fits the memory but this might actually be a fixed-size array, needs runtime check

- types and offsets of lastPosition/position is sure but names is a best guess effort
- ChildBinding might contain Handle and/or WeakHandle, needs runtime check
- DynArray<ChildBinding> fits the memory but this might actually be a fixed-size array, needs runtime check
WorldTransform localTransform; // C0
WorldTransform worldTransform; // E0
uint8_t unkE0[0x120 - 0x100]; // 100
Vector4 lastPosition; // 100

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would lastPosition mean in this context? Can the component move itself?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

position should be equal to worldTransform, but with different precision due to float / FixedPoint conversion.
lastPosition seems to be a tick/frame in the past regarding position.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just my though: currentPosition / previousPosition seems more understandable then position / lastPosition

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I wasn't sure about the naming. I'll change it when I'll have another go with RedMemoryDump to record "frames" at a faster tick rate and confirm handle type.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems odd that position is stored twice. For non moving, non animated entity the transform and both positions are always the same?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum, I'll check those.
But Vector4 values clearly shows valid coordinates and seems a tick behind.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC working on RHT, I've seen a lot of zeroes there for visual components. Which component type are you testing right now?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TransformComponent from a gamePuppet.

@poirierlouis poirierlouis Nov 29, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked the constructor of IPlacedComponent (hash 3069184773).
It contains:

[this + 0x100] = 7F7FFFFF7F7FFFFF7F7FFFFF7F7FFFFF
[this + 0x110] = FF7FFFFFFF7FFFFFFF7FFFFFFF7FFFFF

So it gives us:

Vector4 previousPosition = Vector4(NaN, NaN, NaN, NaN);
Vector4 currentPosition = Vector4(NaN, NaN, NaN, NaN);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's a Box.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants