New Physics Plugin for three.js (using ammo.js)

@Alanine I see the issue.

You have created 2 totally separate physics world. You even include ammo.js twice.

You have to create the physics environment using enable3d and then you can add you own native ammo.js created objects to that environment.

I will try to upload an example that shows how it works today or tomorrow.

Hi,

Your library seems to be very interesting :wink: I would like to do make a slinghot games with your library. Have you a specific example ? I donā€™t see this in your webpage.

Thanks

Thanks :slight_smile:

I donā€™t have an example. But it shouldnā€™t be a problem.

During the aim, the body could be kinematic and switches to dynamic once ready to shoot. You just need the proper math for the calculation of the force/direction for shooting.

enable3d just got a whole lot stabler.
Check out the template project on github!

Hey let me know if you ever make a js version instead of ts. Iā€™m still stuck in old mode :slightly_frowning_face: but sure would use it

I tried hard, but I really couldnā€™t make npm versions run in a simple react app. someone tried this?

Huhā€¦ Javascript OLD mode? Iā€™d say itā€™s PURE mode.

1 Like

@yannick Hey man headless ammo is the coolest thing. I have a quick question.

Can you apply physics to an object after using setVelocity or setAngularVelocity on them? When I use these functions and collide with anything the physics basically cancel out because Iā€™m directly setting the speeds.

Basically Iā€™m making a basic flight sim but if I use the torque and force commands the physics become way more complex.

This flight sim is made in In cannon.js:

It sets the velocities directly rather than applying force but thereā€™s still physics applied because the velocities are all set in a prestep function.

Is something like that available in Ammo?