Comments (8)
having the same issue. lockRotations argument on rigidbody is being ignored
from react-three-rapier.
@wiledal any updates on this? because I need it for locking rotation in 2d space.
from react-three-rapier.
Hey!
I believe the lockRotations
not working is actually an issue with Rapier, not this extension.
enabledRotations={[false, false, false]}
should work however.
from react-three-rapier.
Here's an example using enabledRotations
.
https://codesandbox.io/s/enabled-rotations-olrggu
from react-three-rapier.
@wiledal so why it's not working in my app, is it because I'm using next js or I'm applying rigid body to an external model?
from react-three-rapier.
Were you able to get enabledRotations
working @AmirHo3einJS ?
from react-three-rapier.
@wiledal it didn't work but I found some workarounds. no worries. i don't know why this is happening though. in cannon es when we lock the rotation of a body we cant rotate it in any way but here it's not working. maybe it is a bug from rapier itself.
from react-three-rapier.
LockRotations works for me. It's a function, not a prop. So you need to attach a ref to the rigid body, and run that function on it in an effect. Passing in true as the first arg
from react-three-rapier.
Related Issues (20)
- How to update center of origin position? HOT 1
- RigidBody Hull & Trimesh Colliders resulting in errors HOT 1
- RigidBody Colliders are not updated. HOT 2
- Colliders on PathExtrusionGeometry
- Ghost RigidBody after using setNextKinematicRotation HOT 2
- Does react-three-rapier support RN app? HOT 10
- <CuboidCollider /> component doesn't get rerender! HOT 2
- Can i get the complete control of "when Rapier does run"? HOT 1
- Collider Scale and Position to RigidBody having no effect HOT 4
- Website is broken. HOT 2
- Some Demos are laggy in Edge browser. Is it only me? HOT 3
- PrismaticJointParams donβt match up with usePrismaticJoint HOT 3
- How can I apply RigidBody to extrudeGeometry? HOT 1
- Restore world from snapshot HOT 3
- How i can load RigidBody in order HOT 2
- How to apply forces to dynamically created RigidBodies? HOT 1
- Ball Collider Fails to Interact with HeightfieldCollider in React Three Rapier
- CollisionPayload - event and other types not directly available. HOT 5
- is there an option to recompute the world base on fiber's scene change?
- Make Rapier instance available outside React/hooks HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-three-rapier.