Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Mazen |
So i’ve previously asked a question about how to calculate the distance between a player and an object, the object was a softbody node, community help was amazing, but the answers didn’t work, i just want to point out do NOT use soft body for this kind of tasks, it will always be at position (0,0,0) no matter where u place it, thats why the answers i was given didn’t work, idk if it’s a bug in godot or something else, anyway now i’m using a rigidbody3D nd everything is working fine, however i want to create different rigidbodies all under a group called “object”, nd if the distance between an element of the group nd player is less than 4 the function collect gets applied on it (i’m collecting the elements in a Listitem node), i know about get_tree.get_group(“group name”, “function”) but i just wanna apply that only on the elements that r far than the player by less than 4, is the apprach i’m trying to achieve correct? if not whats the right approach nd how to achieve it