# Why is there no 3D physics engine for Haxe?

**URL:** https://community.haxe.org/t/why-is-there-no-3d-physics-engine-for-haxe/4575
**Category:** Haxe
**Created:** [March 18, 2025, 2:23pm UTC](https://community.haxe.org/t/why-is-there-no-3d-physics-engine-for-haxe/4575 "2025-03-18T14:23:28Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![jul](https://avatars.discourse-cdn.com/v2/letter/j/41988e/32.png) [@jul](https://community.haxe.org/u/jul)
#### Post date: [March 18, 2025, 2:23pm UTC](https://community.haxe.org/t/why-is-there-no-3d-physics-engine-for-haxe/4575/1 "2025-03-18T14:23:29Z")

</div>

First of all, hi all, this is my first post

[Tag: 3d](https://lib.haxe.org/t/3d/)

So, am I missing something? It seems there’s barely one, there’s oimophysics which is 10 years old and seems incomplete but works for limited use cases as far as I can tell… Haxebullet is incomplete too, and just as old, maybe I managed to make it work I don’t remember I just remember I settled for oimophysics back when I was testing/looking for 1.

It’s to use with away3D btw

---

<div class="post-metadata">

### Author: ![Jarrio](https://avatars.discourse-cdn.com/v2/letter/j/5f8ce5/32.png) [@Jarrio](https://community.haxe.org/u/Jarrio)
#### Post date: [March 18, 2025, 2:26pm UTC](https://community.haxe.org/t/why-is-there-no-3d-physics-engine-for-haxe/4575/2 "2025-03-18T14:26:41Z")

</div>

Heaps, Kha and one that is being developed on the discord called Cortex.

---

<div class="post-metadata">

### Author: ![jul](https://avatars.discourse-cdn.com/v2/letter/j/41988e/32.png) [@jul](https://community.haxe.org/u/jul)
#### Post date: [March 18, 2025, 2:30pm UTC](https://community.haxe.org/t/why-is-there-no-3d-physics-engine-for-haxe/4575/3 "2025-03-18T14:30:06Z")

</div>

Heaps is a pain to set up and run on linux last time I tried, I succeeded but it took a while, lots of trial and errors, but I failed to install HashLink, not sure it’s any better nowadays.

---

<div class="post-metadata">

### Author: ![logo](https://community.haxe.org/user_avatar/community.haxe.org/logo/32/1927_2.png) [@logo](https://community.haxe.org/u/logo)
#### Post date: [March 18, 2025, 3:08pm UTC](https://community.haxe.org/t/why-is-there-no-3d-physics-engine-for-haxe/4575/4 "2025-03-18T15:08:14Z")

</div>

I think Jarrio misunderstood your question, but Oimo seems to be pretty complete? As far as I know Cortex Engine is planning to make C++ bindings for JoltPhysics, so might be worth waiting for those (or writing your own!)

---

<div class="post-metadata">

### Author: ![jul](https://avatars.discourse-cdn.com/v2/letter/j/41988e/32.png) [@jul](https://community.haxe.org/u/jul)
#### Post date: [March 18, 2025, 3:19pm UTC](https://community.haxe.org/t/why-is-there-no-3d-physics-engine-for-haxe/4575/5 "2025-03-18T15:19:49Z")

</div>

> or writing your own!

Well, I started contemplating the idea a couple of months ago (porting an already existing one), but then I asked myself “How comes nobody did it already?” see what I mean? It’s not like there’s only one coder on earth, haxe is a cross platform multi target tech, so… Obviously, somebody would have done that already if there wasn’t a catch somewhere… That’s what I concluded, there may be a catch, something, a technicality that becomes painfully obvious only once it’s right in front of your face and then you think “now I understand why nobody did it already…”

For now I only have oimophysics and I could just settle for it, but it doesn’t handle terrains for instance, there’s nothing for that, only primitives… I guess I could learn to live with it, find a not so glorious workaround, but I would prefer to use a tool that just can handle terrains nice and easy in the first place, that would be nice.

Not sure how constrains work also, like for car wheels for instance, not even sure there’s anything to handle them with haxe’s oimophysics version…

So, there’s that

---

<div class="post-metadata">

### Author: ![Jarrio](https://avatars.discourse-cdn.com/v2/letter/j/5f8ce5/32.png) [@Jarrio](https://community.haxe.org/u/Jarrio)
#### Post date: [March 18, 2025, 3:27pm UTC](https://community.haxe.org/t/why-is-there-no-3d-physics-engine-for-haxe/4575/6 "2025-03-18T15:27:01Z")

</div>

Oops, completely missed the word “physics” - my bad

---

<div class="post-metadata">

### Author: ![mikaib](https://community.haxe.org/user_avatar/community.haxe.org/mikaib/32/2442_2.png) [@mikaib](https://community.haxe.org/u/mikaib)
#### Post date: [March 18, 2025, 3:59pm UTC](https://community.haxe.org/t/why-is-there-no-3d-physics-engine-for-haxe/4575/7 "2025-03-18T15:59:58Z")

</div>

There is a pretty good extern available for Nvidia PhysX4 [GitHub - undefinist/physxhx: Haxe/hxcpp @:native bindings for PhysX](https://github.com/undefinist/physxhx)

With some work you can make it work with PhysX5. Note that these externs are only for hxcpp and not HashLink.

---

<div class="post-metadata">

### Author: ![joshtynjala](https://community.haxe.org/user_avatar/community.haxe.org/joshtynjala/32/792_2.png) [@joshtynjala](https://community.haxe.org/u/joshtynjala)
#### Post date: [March 18, 2025, 4:11pm UTC](https://community.haxe.org/t/why-is-there-no-3d-physics-engine-for-haxe/4575/8 "2025-03-18T16:11:34Z")

</div>

> [@jul](#):
>
> Obviously, somebody would have done that already if there wasn’t a catch somewhere… That’s what I concluded, there may be a catch, something, a technicality that becomes painfully obvious only once it’s right in front of your face and then you think “now I understand why nobody did it already…”

The Haxe community is relatively small. If you’re coming from a super big ecosystem like JavaScript or Unity, you might be used to finding a ton of libraries already available. In the Haxe community, it’s more likely that there will be gaps where libraries for certain things are missing or incomplete.

Personally, I wouldn’t assume that there’s a catch. I would assume that existing projects like OimoPhysics have simply been good enough for what folks have needed so far. If you take the time to port something better, I’m sure that the community will appreciate it!

---

<div class="post-metadata">

### Author: ![Confidant](https://community.haxe.org/user_avatar/community.haxe.org/confidant/32/63_2.png) [@Confidant](https://community.haxe.org/u/Confidant)
#### Post date: [March 19, 2025, 5:07pm UTC](https://community.haxe.org/t/why-is-there-no-3d-physics-engine-for-haxe/4575/9 "2025-03-19T17:07:14Z")

</div>

I tend to collect links for such things. Oimo does seem to be the best for Away3D. I’ve had successful experiments with it.

> **[GitHub - vujadin/Away3D\_with\_OimoPhysics: Using OimoPhysics with Away3D...](https://github.com/vujadin/Away3D_with_OimoPhysics)**
>
> Using OimoPhysics with Away3D https://vujadin.github.io/Away3D\_with\_OimoPhysics/demo/index.html

Using OimoPhysics with Away3D [Away3D Basic View](https://vujadin.github.io/Away3D_with_OimoPhysics/demo/index.html)  
[GitHub - saharan/OimoPhysics: A cross-platform 3D physics engine](https://github.com/saharan/OimoPhysics)  
[GitHub - vujadin/Heaps\_with\_OimoPhysics: Using OimoPhysics with Heaps https://vujadin.github.io/Heaps\_with\_OimoPhysics/demo/index.html](https://github.com/vujadin/Heaps_with_OimoPhysics)

---

<div class="post-metadata">

### Author: ![Confidant](https://community.haxe.org/user_avatar/community.haxe.org/confidant/32/63_2.png) [@Confidant](https://community.haxe.org/u/Confidant)
#### Post date: [March 19, 2025, 6:18pm UTC](https://community.haxe.org/t/why-is-there-no-3d-physics-engine-for-haxe/4575/10 "2025-03-19T18:18:27Z")

</div>

Apparently for Heaps there is [GitHub - luboslenco/jiglibhx: 3D Physics Engine ported to Haxe](https://github.com/luboslenco/jiglibhx)

---

<div class="post-metadata">

### Author: ![jul](https://avatars.discourse-cdn.com/v2/letter/j/41988e/32.png) [@jul](https://community.haxe.org/u/jul)
#### Post date: [March 21, 2025, 3:44pm UTC](https://community.haxe.org/t/why-is-there-no-3d-physics-engine-for-haxe/4575/11 "2025-03-21T15:44:52Z")

</div>

Yeah that’s pretty much where I ended up landing, I’ve combined away3D and oimo using haxelib’s versions and compiled for desktop and it works. And that demo here [GitHub - vujadin/Away3D\_with\_OimoPhysics: Using OimoPhysics with Away3D https://vujadin.github.io/Away3D\_with\_OimoPhysics/demo/index.html](https://github.com/vujadin/Away3D_with_OimoPhysics) is pretty much all you can get with it as far as I can tell, there’s nothing to handle collision with an away3D generated heightmap terrain for instance, which is unfortunate. I tried to hack my way around it but that’s dirty especially when it comes to getting proper bouncing and frictions according to terrain’s slopes, it’s a mess.
