Skip to content

Smoothness codex4#300

Merged
from2001 merged 2 commits intoimprove/smoothnessfrom
smoothness-codex4
Jan 24, 2026
Merged

Smoothness codex4#300
from2001 merged 2 commits intoimprove/smoothnessfrom
smoothness-codex4

Conversation

@from2001
Copy link
Collaborator

This pull request updates the NetSync protocol to support full 7-component quaternion poses, introduces a new protocol version (v2) for client and room pose messages, and simplifies stealth mode detection using a flag bit. It also updates serialization/deserialization logic and the client simulator to use quaternion rotations instead of Euler angles on the wire. These changes improve pose accuracy, extensibility, and protocol clarity.

Protocol and Message Format Upgrades:

  • Introduced protocol version 2 with new message types: MSG_CLIENT_POSE_V2 and MSG_ROOM_POSE_V2, replacing the legacy 6-float transform messages. These new messages include protocol version, pose sequence, flags, and support for 7-float (quaternion) poses. (binary_serializer.py, client_simulator.py, client.py) [1] [2] [3] [4] [5] [6] [7]

  • Serialization and deserialization routines now handle 7-float poses (including rotW for quaternions), protocol version, pose sequence, flags, and broadcast time for room messages. (binary_serializer.py) [1] [2] [3] [4] [5]

Stealth Mode Detection Simplification:

  • Stealth mode is now indicated by a flag bit (flags & 0x01) instead of NaN values in transforms, simplifying checks and message size. (adapters.py, binary_serializer.py) [1] [2]

Pose Data Structure Enhancements:

  • Added support for rotW (quaternion w component) in all pose serialization and adapters, ensuring full quaternion support throughout the protocol. (adapters.py, binary_serializer.py, client_simulator.py) [1] [2] [3] [4]

  • Added new fields (poseTime, poseSeq, flags) to client pose data and wire format for improved synchronization and extensibility. (adapters.py, binary_serializer.py) [1] [2] [3] [4] [5]

Client Simulator and API Updates:

  • Client simulator now converts Euler angles to quaternions before serialization, matching the new protocol requirements. (client_simulator.py)

  • Updated all references and message type names to use the new v2 protocol constants and field names. (client_simulator.py, client.py) [1] [2]

These changes modernize the protocol, improve pose fidelity, and make future extensions easier.

…hing

- Introduced TransformBinding struct for better organization of transform data.
- Updated initialization methods to support new smoothing settings and time estimation.
- Replaced immediate target application with snapshot-based updates for smoother transitions.
- Enhanced Tick method to apply transforms based on estimated server time and dynamic buffer multipliers.
- Modified AddSnapshot and Clear methods for better state management.
- Updated TransformSyncManager to include pose sequence in transmitted data.
- Changed physical rotation representation from Vector3 to Quaternion for consistency.
- Improved handling of pose flags in NetSyncAvatar for better state tracking.
- Adjusted UpdateHumanPresenceTransform to use Quaternion for rotation calculations.
@from2001 from2001 merged commit 8fe55ea into improve/smoothness Jan 24, 2026
@from2001 from2001 deleted the smoothness-codex4 branch January 26, 2026 11:31
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.

1 participant