Giter VIP home page Giter VIP logo

Comments (8)

enderh3art avatar enderh3art commented on June 2, 2024

having the same issue. lockRotations argument on rigidbody is being ignored

from react-three-rapier.

AmirHo3einJS avatar AmirHo3einJS commented on June 2, 2024

@wiledal any updates on this? because I need it for locking rotation in 2d space.

from react-three-rapier.

wiledal avatar wiledal commented on June 2, 2024

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.

wiledal avatar wiledal commented on June 2, 2024

Here's an example using enabledRotations.
https://codesandbox.io/s/enabled-rotations-olrggu

from react-three-rapier.

AmirHo3einJS avatar AmirHo3einJS commented on June 2, 2024

@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.

wiledal avatar wiledal commented on June 2, 2024

Were you able to get enabledRotations working @AmirHo3einJS ?

from react-three-rapier.

AmirHo3einJS avatar AmirHo3einJS commented on June 2, 2024

@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.

Seanmclem avatar Seanmclem commented on June 2, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.