dimforge / rapier

2D and 3D physics engines focused on performance.
https://rapier.rs
Apache License 2.0
3.8k stars 236 forks source link

`user_data` for joints #505

Closed mrDIMAS closed 10 months ago

mrDIMAS commented 1 year ago

Removes inconsistency with other entities, such as rigid bodies and colliders - they all have user_data field.

Motivation

This field is usually used to store a pointer/handle to game/engine/etc entities associated with a rigid body/collider/joint. And the lack of user_data field causing troubles in Fyrox - I forced to use a hash map like HashMap<Handle<Stuff>, JointHandle> to bypass this issue, which has both performance and usability impact.

sebcrozet commented 10 months ago

Thanks!