pmndrs / react-three-rapier

🤺 Rapier physics in React
https://react-three-rapier.pmnd.rs
MIT License
1.05k stars 58 forks source link

How to use Rigidbody with Html? #645

Open fax1ty opened 6 months ago

fax1ty commented 6 months ago

Can you tell me how to use Rigidbody correctly with Html?

If you nest Html within the Rigidbody, it will align closer to the center relative to all the children, depending on the height of the collider. How can I disable this centering? How can the children be positioned closer to the bottom-left corner (or elsewhere)? I want to set a height (position-y) value so that the UI is always displayed in the same position.

The problem is with the dynamically selected geometry. I know the height of each object and can adjust position-y accordingly.

P.S. Can you tell me more about centering? At the moment, it's a bit confusing.