Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

189
Vistas
How can i make an object jump using Cannon.js + Three.js

While searching for this solution, I noticed many used, cannonBody.velocity.y = JUMP_VELOCITY

But in my case, It works while the object is already in motion but not once it became stationary. So, I was wondering if there are a few conditions to be met for it to jump.

I would also encourage a demo snippet of making a simple object (a ball) to jump when the spacebar is pressed.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I switched to OimoPhysics and things woke up properly. It uses the same conventions. How it replaces the physics world in a declarative setup, I don't know..? I've done that with Canon, where you set the config tolerance. But even with the quick setup where you just add a body or move it, Oimo solved the sleep problem immediately. ApplyForce would be more consistent and realistic than an arbitrary + y value. I think applyForce would give less problems.

It's easy to forget to call update on the physics after you move the geometry. If the render loop misses a step your geometry may be frozen, lost to the physics body. Or if you add another physics body in its place the original pointer may be lost. Then if another body collides it will suddenly wake up. It depends on the circumstances and the version...

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda