0 votes

I'm trying to change the sprite of the player object (2D kinematic body) into the object that was collided with.

I've been able to get to a point where the sprite changes into a different sprite, but I can't seem to find a function that returns the object that was collided with.

Everything is under a 2D Node, and my movement is done with 8-way movement, using the standard WASD format.

Any help would be appreciated.

in Engine by (14 points)

1 Answer

+1 vote

The answer depends on how you're moving your KinematicBody2D. Please see this article in the docs:

by (21,967 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 Frequently asked questions and 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 [email protected] with your username.