0 votes

Im making a adventure game and I want to have the player's life decrease when it touches a monster. Im using v3.0.6

in Engine by (22 points)

You need to supply more information. What type of object is the player? The monster?

Also, out of curiosity, why are you using such an old version of Godot?

The player is a KinematicBody2D and the monster is a Staticbody2D

1 Answer

+1 vote
Best answer

When you move a KinematicBody2D, you use one of its movement methods, and if there's a collision you get back a KinematicCollision2D object. This object contains all the information about the collision. See here for details: Using KinematicBody2D

by (20,925 points)
selected by

Thank you for the info

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.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.