I’m working on an fps and am using blender to generate assets. I think it’s really handy how you can direct import objects from blender and use tags to do things like give them colliders automatically. is there a way to write custom tags for blender that will do things similar to giving an object a collider? for example, maybe I can have a point in blender, and using tags that point is turned into an ammo pickup in-game or something along those lines? I feel like it would be useful for level editing efficiency
if I want to export something from Blender to Godot and it has an interactive element like a drawer or a window, I give it a collision shape using -col and I parent it to an empty and give the parent a custom suffix like -door in the game I will have a ray for the player’s eye, and when the player is pressing the interact button, it checks if it’s colliding, and if so, checks whether the parent nodes name ends with -door
# script on raycast3d this is godot 3.5
func _input(event):
if event is InputEventKey && event.is_pressed() && event.get_scancode() == 69:
if is_colliding():
if (get_collider().get_name().ends_with("-door")):
var door_ang = get_collider().get_parent().rotation_degrees.y
if door_ang == 0:
get_collider().get_parent().rotation_degrees.y = -90
else :
get_collider().get_parent().rotation_degrees.y = 0
I think that’s the right direction for me to look in. I’m thinking particularly about populating enemies and similar entities into a scene with blender’s somewhat more intuitive/flexible viewport, so I could use a script when the level starts to check for names with tags like that. thanks