How to apply force to make object draggable | R3F rapier

Hi everyone!
I’m trying to replicate this example of @drcmda : plane-Project
with @react-three/rapier i,e with physics engine. but got stuck at a point for days now which is how could I apply force on mouse click to move the object. I tried manually changing the positions with useDrag but its overlapping. when I apply some kind of force like gavity to x or z axis or applyImpulse to RigidBody they are colliding with each other.

Here’s is my sandbox: r3f-rapier
Any kind of openion is appreciated, I need just some hints on it. it’s getting really frustating to me.

1 Like

I encountered a similar issue when working with DragControls and RigidBody. You can review my solution in this repository: DraggableRigidBody.

In essence, the key is to decouple the RigidBody from the DragControls and manage their synchronization programmatically based on user input.

1 Like

A lot of free app and games u guy can download at here