miniplex + rapier = ๐?
Closed this issue ยท 2 comments
Hi there,
not sure if it's a bug, cause i am super new to miniplex
.
I can't get the ref of the @react-three/rapier
's RigidBody
via:
<ECS.Component name="rigidBody">
<RigidBody />
<ECS.Component>
I made a minimal example:
https://stackblitz.com/edit/vitejs-vite-dt2zjv?file=src%2FApp.tsx
Problem: The Entity's rigidBody
is set to null
I am trying to do it like here: https://github.com/hmans/composer-suite/blob/main/apps/spacerage/src/scenes/gameplay/Player.tsx#L19
The versions of miniplex-react
and @react-three/rapier
changed a lot since the working example, i am not quite sure where to look for the "bug"
Cheers
Tristan
Hi! <ECS.Component>
with a (single) child expects that that child component forwards its ref (ie. it allows you to set a ref
prop). It then does exactly that and stores the value of the ref in the specified component.
The version of react-three-rapier that I was using had this behavior. I don't know if it has changed in the meantime since I haven't used it then. If so, please approach the react-three-rapier team or file a bug there.
I'm closing this as there is nothing to be fixed. I would also kindly ask you to use Discussions for questions instead of opening an issue. Thanks!
I made a discussion thread about this in the rapier repo: pmndrs/react-three-rapier#573