Hey guys, coming from Unity with 0 experience with JavaScript or your engine.
I started a blank project and imported ammo.js which I see in assets. I added a rigidbody component to a cube and ensured gravity is set properly in Physics settings. Rigidbody is dynamic with low mass. Quite simply, no physics occurs.
Checked docs, followed steps identically, no dice. Checked the internet, no additional steps listed. What did I miss?
The issue is not collision, there is no physics at all. As in, if I spawn the rigidbody in the sky, it won’t fall. It remains as if it is static, and doesn’t have a dynamic rigidbody (which it does).
Without sharing the project since it’s essentially brand new, I did the following:
Start a blank template
Create a cube and make it a prefab
Add a rigidbody to the cube and import ammo when prompted on the rigidbody component
Warning goes away on rigidbody, move to higher Y and set to Dynamic
Adding a collider component worked. Migrating from another engine is tough since I am expecting everything to operate as others I have worked with in the past have, wasn’t expecting a collider as a requirement for physics behaviors.
Is it possible to make the rigidbody animate the object without collision? I don’t really need it for the effect I am trying to achieve, and setting a collider to 0x0x0 seems like it would be unnecessary if I can just operate without it.
To clarify, I want to detect ‘collisions’, but I don’t want the objects to modify each other via collision. They should pass through each other, but still notify me that they collided.
Based on my review of the docs, it seems the only way to achieve a trigger collider on an object is to add a ‘Collision’ component with no rigidbody, but I would like both my objects to have a rigidbody so I can apply a force to move them with linearVelocity. I just want them to pass through each other.
Currently, this happens. I have an object fired from the camera with a rigidbody and collider along with another rigidbody/collider object being spawned a ways away from the camera, but when the objects collide, nothing is detected.