How can I detect if the player is touching a cell?
The problem is that if have the player making tiles in game using set_cell but I don’t know how to detect if it’s touching the player since I don’t know if area2d can be cloned or something I’m new
How can I detect if the player is touching a cell?
The problem is that if have the player making tiles in game using set_cell but I don’t know how to detect if it’s touching the player since I don’t know if area2d can be cloned or something I’m new
Are you looking to do something when the player enters the block they’ve placed? If so, you’ll want to use the built-in signal in the Inspector under the ‘Nodes’ tab. Your function will look something like:
func _on_body_entered(body: Area2D):
#your executed function here
EDIT: I like this YouTuber; I haven’t watched this video specifically, but I’ve seen other tutorials of theirs.
I’m making like a 2d raft game. I want it so if the player isn’t touching the blocks (which is the raft) it will go to a swimming animation
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.