[Vue/Nuxt] Physics engine referencing

Hi,

So I need to do some raycasting. From a moving position (player position) downwards. I need some kind of a ray hit response, as I need a normal.

So it looks like I need to use Physics, but before beeing able to use it I need to initialize it with a plugin.

And here’s the problem. I’m not sure how to do it properly. It seems I don’t know how to reference the actual physics engine with Vue (Nuxt3).

Ideally I’d want npm package, but all of them (ammo, cannon) are quite old (8 years), they are missing documentation or typescript interface…

Any advice?

Ok here’s the answer for me How to introduce Ammo.js

1 Like