[SOLVED] Basic applyForce not working

Imagine trying to thrust the default cube forward with constant force, using a simple thrust script.

In Thrust.prototype.update:

this.entity.rigidbody.applyForce(new pc.Vec3(this.thrust * dt,0,0));

I’ve adjusted the thrust field from 100 to 1000 to 10000 and higher, no movement.

https://playcanvas.com/editor/scene/2040294

I’ve added the ammo.js, does it need to be imported again or otherwise linked?

I’ve tried lowering friction to 0. I’ve tried floating the cube in the air to avoid friction. I tried lowering the mass to 0.1kg.

I must be missing something. ChatGPT doesn’t have any more useful suggestions, Googling doesn’t work. I’ve skimmed a bunch of related posts. What am I missing???

Ok, figured it out. I didn’t have a Collider. Why is a collider required for applying forces? No collider => no collision?

Hi @Michael_Lewis and welcome!

That’s correct, the collider is the shape of the rigidbody.