![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | OuterSpaceFarAway |
I want to create a 2D adventure game where the main character walks around and interacts with objects and NPCs to solve puzzles. I have a RichTextLabel at the bottom of the screen that I’d like to update with relevant information about what the character is interacting with.
I can update the RichTextLabel when sending signals from RigidBody2D objects, but cannot when interacting with RigidBody2D objects set in “Static” mode. No signal information is sent over it seems. I want the objects and NPCs to be immovable in the environment, so this presents a problem.
Any help would be greatly appreciated! If there are any good Godot tutorials for 2D adventure games, I’d love to know!
It’s totally possible for static RigidBody2Ds to send signals. I think something else is up with your game.
Also, if you don’t want the objects to move, why not use StaticBody2D instead of RigidBody2D?
exuin | 2021-05-19 06:59
I think you’re right. I’m still new to Godot and am playing around with a lot of things, so probably something else is causing the signal not to be sent when the NPC is a static RigidBody2D. I couldn’t figure out how to send signals from a StaticBody2D on a collision and didn’t see an option to turn on contact monitoring in the inspector.
I used the solution by MadJester below which works well for the simple game I’m planning.
Thanks for the input and help!
OuterSpaceFarAway | 2021-05-19 14:07
Oh, you’re using it to send signals from a collision? Then yeah, StaticBodies don’t detect collisions at all - so they won’t send collision signals. Yeah, the solution below is good.
exuin | 2021-05-19 14:11