Kinematic character controller dips and can eventually fall through moving vertical platform
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- javascript, rust, wasm
- Área
- game-dev
Línea de trabajo
Reproduce el problema usando los ejemplos enlazados y, después, lee src/plugins/KinematicCharacterController.ts alrededor de la línea 263 y physics/physics.game.ts alrededor de la línea 239. Compara el comportamiento de JavaScript con la implementación de Rust del character-controller y el movimiento de plataforma de kinematicPositionBased. Se considera terminado cuando el controlador permanece sobre una plataforma que se mueve verticalmente sin rebotar, hundirse ni atravesarla al caer.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
When standing on top of a vertically moving platform, the kinematic character controller doesn't stay stuck to the platform. Instead it kind of bounces and dips into the platform. This can be observed here:
https://user-images.githubusercontent.com/1753624/236084741-bbf633cd-cd61-4202-87a2-c1cead4f2598.mp4
If you constantly move while standing on top of the platform, this bouncing effect is canceled out:
https://user-images.githubusercontent.com/1753624/236084973-f924363a-abe3-4ea2-8682-06e5a0656e69.mp4
And sometimes you can fall through the platform entirely:
https://user-images.githubusercontent.com/1753624/236087175-46d4fdf2-5b14-49fa-adf9-dba2e10362cf.mp4
This example uses Rapier.js but I don't think this is specific to the WASM version.
Here's our character controller settings:
const characterController = physicsWorld.createCharacterController(0.1);
characterController.enableAutostep(0.7, 0.3, true);
characterController.enableSnapToGround(0.3);
characterController.setCharacterMass(100);
characterController.setApplyImpulsesToDynamicBodies(true);
characterController.setSlideEnabled(true);
And here you can see where we compute the character controller position:
https://github.com/matrix-org/thirdroom/blob/e4c1a24a21e6d7300c7dabc5055b93ed6847ac3a/src/plugins/KinematicCharacterController.ts#L263
The platform is a kinematic rigid body (RAPIER.RigidBodyDesc.kinematicPositionBased()) which is moved using: body.setNextKinematicTranslation(_v)
https://github.com/matrix-org/thirdroom/blob/e4c1a24a21e6d7300c7dabc5055b93ed6847ac3a/src/engine/physics/physics.game.ts#L239
Here's the example live, you'll need at least a guest account to view it:
https://deploy-preview-599--thirdroom.netlify.app/world/#websg-v1-dev:thirdroom.io
You can also see this live in another example using Rapier and react-three-fiber:
https://game-sandbox.vercel.app/
https://github.com/alexandernanberg/sandbox
https://user-images.githubusercontent.com/1753624/236088614-5f57bd75-1c4a-44c7-bdfb-c491ca79c48a.mp4
@NateTheGreatt and I have looked at the code in the Rust implementation of the character controller and tried tweaking things. However, we're not exactly sure where to look. We're happy to help fix the issue but could use some help figuring it out.
- Lenguaje dominante
- Rust
- Estrellas
- 5.9k
- Forks
- 410
- Merge medio
- 3 h 59 min
- PR fusionados (30 d)
- 10
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de dimforge/rapier
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Debug assertion in the incremental solver-contact graph when a ball rolls on a Voxels colliderPosiblemente ocupada @shtse8 la tomó hace 26 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Typo in the docsAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 56/100
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 67/100
Los mantenedores suelen responder en 1 día
Todos los issues de dimforge/rapier
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
manuscript-lang/manuscript#1364 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
equinor/septic-config-generator#504 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
GiganticMinecraft/seichi-portal-backend#1633 ·
Los mantenedores suelen responder en 1 día
-
`printf "%o"` prints decimalAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
fable-compiler/Fable#5157 ·
Los mantenedores suelen responder en 1 día