Difficulties when trying to set collision layers/masks through code
Asked Answered
I

3

0

In the documentation ( https://docs.godotengine.org/en/stable/classes/class_collisionobject3d.html#class-collisionobject3d ) it says set_collision_layer_value(int,bool) is the correct one, tough it didnt work, and online I saw some people using set_collition_layer_bit(int,bool) in 3.x , but I had no success. The editor even tries to correct me, but doesnt recognize it.

The error

My node tree

Was using StaticBody3D, no success with RigidBody3D

Wondering if I'm doing something wrong or should open an issue, in this project, setting through code is the best option. Thank you for your time!

Ineffable answered 10/2 at 22:31 Comment(0)
S
1

Does your script extend RigidBody3D?

Slide answered 10/2 at 22:54 Comment(0)
I
0

Slide I feel so dumb right now. Thanks for the answer!

Ineffable answered 11/2 at 11:50 Comment(0)
S
0

Ineffable Don't worry. This happend to me so often when changing the node type. 😄

Slide answered 11/2 at 16:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.