pmndrs / use-cannon

👋💣 physics based hooks for @react-three/fiber
https://cannon.pmnd.rs
2.76k stars 154 forks source link

Enable hinge motor #185

Closed brunnolou closed 3 years ago

brunnolou commented 3 years ago

What

This PR adds the following methods to Hinge constraint:

It also adds a Demo showing off a practical example.

https://user-images.githubusercontent.com/2729225/115790503-b9b9b000-a3be-11eb-83f2-b243b8802219.mp4

Why

It allows rotations to simulate many things like vehicles, robots, etc, by taking into account the motor force.

How

Closes #176