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

asked Apr 21 in Projects by JohnPrattAllen (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

answered Apr 21 by kidscancode (17,762 points)
selected Jun 7 by JohnPrattAllen

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.