Skip to content

Conversation

andytriboletti
Copy link
Contributor

Add rapier terrain physics example

Description

I noticed there was an ammo physics terrain example but not rapier.

Does this look ok to contribute?

I love three.js! Thank you!

@WestLangley
Copy link
Collaborator

Use RapierPhysics instead of direct Rapier in example. Update RapierPhysics with addHeightfield.

const radius = parameters.radiusBottom !== undefined ? parameters.radiusBottom : 0.5;
const length = parameters.length !== undefined ? parameters.length : 0.5;
const length = parameters.height !== undefined ? parameters.height : 0.5;
Copy link
Collaborator

@Mugen87 Mugen87 Apr 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While testing I have notice the collisions for the cylinder meshes were incorrect. Turns out wrong parameters were evaluated.

@Mugen87 Mugen87 added this to the r176 milestone Apr 12, 2025
@Mugen87 Mugen87 changed the title Add rapier terrain physics example RapierPhysics: Add heightfield support. Apr 12, 2025
@Mugen87 Mugen87 merged commit 6ff21e0 into mrdoob:dev Apr 12, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants