Questions tagged [rapier]

11 questions
4
votes
2 answers

Why are Bevy's Trait bounds not satisfied for the Rapier physics plugin?

I've been trying to run this minimal example to get Rapier's physics working with Bevy: use bevy::prelude::*; use bevy_rapier2d::prelude::*; fn main() { App::new() .add_plugins(DefaultPlugins) …
TechPerson
  • 320
  • 1
  • 8
1
vote
2 answers

Select entity by mouse clicking with bevy & rapier

So, I'm using Bevy (0.11) the Rapier (0.22) physics engine to have a bunch of blocks falling on each other, here is how I spawn the blocks: commands.spawn(( Collider::cuboid(dim, dim), MaterialMesh2dBundle { mesh: meshes.…
CpILL
  • 6,169
  • 5
  • 38
  • 37
1
vote
0 answers

How can I have multiple forces act on an entity in Bevy?

I'm making a game in rust, in Bevy with Rapier2d physics. I want to apply forces to the entities from different functions (systems). How is multiple external forces added to entities?
0
votes
0 answers

Updating position and rotation of a RigidBody or MeshCollider and making it follow along it's child mesh, using react-three/rapier or cannon

So I have a react-three/fiber scene component, where I am animating a rigged character. I want to apply colliders to eg. the hands, so that the movement and rotation of the skinned mesh will apply to its collider, and thereby not having the collider…
konrad
  • 81
  • 3
0
votes
0 answers

Cannot wake up RigidBody after gravity change

I have a cube that is supposed to be floating (gravity set to 0). After an event, the cube is supposed to "fall down" (gravity set to 1). I know that the RigidBody is asleep when gravity is set to 0, so I am trying to wake it up by applying an…
user2393256
  • 1,001
  • 1
  • 15
  • 26
0
votes
1 answer

Drawing colliders with rapier2d-compat. debugRender returns an empty array

I try to use this example: Add basic debug-render support but I don't understand why debugRender.vertices returns an empty array. I added box and circle colliders to the world. I created the issue:…
8Observer8
  • 868
  • 10
  • 17
0
votes
0 answers

create controller movement with keys for cube

hey recently started to learn about 3d(threejs) and physics(rapier), I want to control the box movement like a car with arrow keys, but I have difficulty fixing the movement in the right direction with physics. here is a code example…
Nati
  • 116
  • 1
  • 5
0
votes
1 answer

How to connect a sphere to a rigid body with rapier 0.17.0?

I would like to connect my sphere to a rigid body, how would I do that with rapier? fn main() { let position = Point3::new(0.0, 0.0, 0.0); let sphere = BoundingSphere::new(position, 100.0); let rigid_body = RigidBodyBuilder::fixed(); //…
kemicofa ghost
  • 16,349
  • 8
  • 82
  • 131
0
votes
0 answers

react-three-rapier doesn't update rigidbodies

I'm working on a custom "cloth" implementation. I have pretty much everything working except for a couple things: When I update the number of segments within the plane/cloth using the UI, the y direction works perfectly, but when changing the x…
tkd_aj
  • 993
  • 1
  • 9
  • 16
0
votes
0 answers

How to make Camera follow a react three rapier object,

I’m experimenting with using react-three/rapier as my physics engine, however I can’t get a camera to follow the position of a Rapier object. The camera follows the object as it falls down the z axis, but as soon as it hits the ground and bounces…
WillMaddicott
  • 512
  • 6
  • 20
0
votes
1 answer

Collision detection not aligning properly when rendering Rapier.js to the DOM

I've made a simple example with Rapier.js to illustrate my problem on a CodePen. I'm trying to use the JavaScript API of the physics engine Rapier to render DOM elements with collision detection. If the elements are the same size then it works as…
David Braun
  • 5,573
  • 3
  • 36
  • 42