0 votes

I have a ball instance that is a RigidBody2D and I want it to 'activate' a button. This button is a KinematicBody2D. I don't think that the button should be a KinematicBody2D, but what do I know.

Any help would be greatly appreciated!

asked Jun 3, 2017 in Projects by Giantpotato (14 points)

Can the button move? What does it do after it's been activated?

1 Answer

0 votes

RigidBody2D can report collisions (contact monitor need to be enabled and set to more than zero) and you can get them via signal (body_enter) or checking on fixed process/custom integrator (get_colliding_bodies).

Then just just do something like getting the group of the object is touching (you can check the angle and other things to detect a correct trigger collision), if you identify it as a "button", tell that button to do something.

answered Jun 3, 2017 by eons (7,786 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.