How to give a gridmap a physics body through code
Asked Answered
T

1

0

Hello,

I am generating a gridmap world, I was able to create it. However I do not knowhow to give it a physics body, I have set the mask and layer to 1.
set_collision_layer_value(1,true)
set_collision_mask_value(1,true)

I have given the gridmap a physics material

My sphere is working well, it also has the layer and mask of 1

Any help would be appreciated.

Tiliaceous answered 29/5, 2023 at 16:45 Comment(0)
O
0

Tiliaceous You can add collision shapes to mesh library items using MeshLibrary::set_item_shapes()

Odine answered 29/5, 2023 at 17:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.