Comments (3)
Thank you for this feature suggestion. What are some concrete use-case for these factors?
If you are looking for the ability to lock the rotation and/or translation movements of a rigid-body, you can already use RigidBodyDesc.restrictRotations
, RigidBodyDesc.lockRotations
, and RigidBodyDesc.lockTranslations
.
from rapier.js.
@sebcrozet to be honest, I don't have many examples, when I would use it other than just to lock some axis. I think the only time I used it with interpolation between 0 and 1 was when there was a game with wind gusts, where a wind would suddenly "blow" from some direction at varied strength, dampening the player controller movement at some direction. I guess the same could be achieved by applying a force on the controller.
I stumbled upon this while integrating Rapier with PlayCanvas, which currently is integrated with Ammo. The Editor exposes those properties:
Setting one of them to 0 would effectively "lock" the axis, which is a way to do it in Ammo. Not too critical of a feature, I suppose, as I can probably output a message to user that only 0 or 1 is supported when using Rapier backend.
from rapier.js.
In a casual game of bowling, I have some hazards on the road that imped the ball's travel. For example, water or sand, which affect the ball's movement in a single or both axii. The way it works is that the ball multiplies own factors with whatever it traverses through. I think it would be a good case for enabling linear/angular factors here. For now, I have to code in the factors separately for each type, verify the obstacle type the ball is going through and manually adjust the velocity based on the factors multiplication result.
Edit:
Actually, thinking about it, this is not how the linear factor should be used. I mean it can, but then it is a decision of mine, rather than the physics engine. One's linear factor should not affect the other one's. It's probably related to the friction factors rather, but I think we can't change friction on each axis individually.
from rapier.js.
Related Issues (20)
- Contact force behaviour changes upgrading from 0.11.2 to 0.12.0 HOT 3
- RangeError when creating colliders HOT 2
- Expose `user_force` for RigidBody2D
- World.debugRender returning extra lines HOT 1
- Runtime Error: unreachable on long running window HOT 2
- Changing RigidBody bodyType before any collisions makes rigidBody static HOT 2
- RuntimeError: unreachable when using RAPIER.JointData.spring HOT 1
- Large filesize (1MB of raw WASM) HOT 3
- RigidBody/Joint/etc. Cloning
- Set Frame for Revolute/Prismatic Joints
- TriMesh should have better documentation. Example included. HOT 1
- Built app WASM issue after upgrading to 0.13.1 HOT 9
- KinematicCharacterController.setMaxSlopeClimbAngle is not working HOT 4
- Issues with sensors HOT 2
- Add missing bindings to the JS bindings.
- `RigidBody.lockRotation` and `RigidBody.lockTranslation` do not unlock when sent `false` on its `locked` argument HOT 2
- Unstable core features HOT 3
- Tunneling problem with CCD enabled bodies HOT 2
- Unable to configure stiffness or damping for spherical joints
- Adding ±90 Degree Rotation Limits to JointData.spherical 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 rapier.js.