Gridmaps with GPU particle collision
Asked Answered
N

7

0

Hi all!

I'm having some difficulties with gridmaps and GPU particles.

Using regular collision shapes and meshes works as expected with the MeshLib, no issues there. But I can't seem to get it to work with GPUParticle collisions. Doesn't Gridmap/MeshLib support this?

Does anyone know if this is supported? If not, any good workaround for this?

I'm still on Godot 4.1 and haven't upgraded yet.

Nonmoral answered 17/12, 2023 at 13:54 Comment(0)
H
0

Nonmoral GUP particles won't collide with regular collision shapes. You need to use special particle colliders. Take a look here for details.

Hagberry answered 17/12, 2023 at 14:57 Comment(0)
N
0

Hagberry Ah yes.. I know that. I meant that it doesn't seem that the GPUParticlesCollision nodes play well (sorry, I wasn't clear on that in my post), including them in the MeshLib for the Gridmap. And I can't find anything mentioned about it in the documents.

Nonmoral answered 17/12, 2023 at 15:35 Comment(0)
H
0

Nonmoral I haven't tried it. If it really doesn't work you can always resort to writing a script that'll look into library meshes for colliders and re-create them as plain nodes over the grid map.

Hagberry answered 17/12, 2023 at 15:42 Comment(0)
N
0

Hagberry That's an interesting approach, thanks! I will dig into that, and see if that would work.

Nonmoral answered 17/12, 2023 at 17:3 Comment(0)
T
0

Nonmoral If this is an issue for you I think it's worth bringing to core developers attention as an issue report, even if they don't consider it to be a bug. With enough user feedback on this they might consider reevaluating the importance on this. Without such feedback however they might just keep thinking it a non-issue...

Tezel answered 17/12, 2023 at 21:19 Comment(0)
N
0

Tezel I agree... I just wanted to see if I was missing something by not knowing it well enough.

Nonmoral answered 17/12, 2023 at 21:57 Comment(0)
N
0

So, just an update on this. I learned that the way to go is to use GPUParticlesCollisionSDF3D. The problem is that it needs to be baked, and I can't do that through a script (which I need due to the procedural level system).

Another solution would be to use GPUParticlesCollisionHeightField3D. This is what I ended up using for now. It works great for having particles colliding with the floor. But it's not great if you want particles to collide with walls etc.

I did open up a Github issue on this regarding the gridMap. Github issue

But as I learned, I think my issue would be solved if I could bake GPUParticlesCollisionSDF3D during runtime.

Nonmoral answered 26/12, 2023 at 8:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.