Simply put, I want to make a Gridmap functionally identical to a Rigidbody physics object. I want it to be affected by gravity and have linear and angular velocity while still being made out of blocks. Is this something Godot is capable of? And if so, how would I go about achieving this?
Hi !
Couldn’t you just put your GridMap as a child of a RigidBody node?
Unfortunately, no.
Why wouldn’t this solution work for your needs?
Is there an additional feature that you want that this solution does not allow?
If you want every cell in a GridMap to be considered a RigidBody, independent of other cells, then, as far as I know, this is not going to be possible with the use of a native GridMap, no.
You should look for a roundabout way to achieve your need.
Maybe I’m wrong and someone has a solution though.
As far as I know and have tested, Gridmaps aren’t a valid replacement for collision shapes with the Rigidbody3D node. My idea though is for the blocks in the gridmap to be connected and function as one rigidbody while still being a gridmap that you can add on to and manipulate.
It seems from my research that nobody has asked about this or attempted it so it may just be not possible.
I ran into the same problem for my current project and for the last few weeks I’ve been creating my own ‘rigidGrid’ (for the tileMap/2D gridMap) using GDscript.
I’m ~85% of the way there rn, it currently supports:
- Reading/editing cells and rows
- Greedymesh rendering with textures
- Detecting disconnected objects in a grid and turning them into a separate physics object
- Mass calculation & center of mass updating
The only big thing it’s missing is chunking (max chunk size is 64 blocks in each dimension due to technical limitations), and once it’s finished I eventually plan to port it to 3D for future projects.
If you’re still interested (and don’t mind a bit of labor) I can send over what I have and help port it to 3D, or I can let you know when I have the 3d version working
Can you please send this to me, it sounds perfect for a project I am working on