#How to move enemies to player with collision for world

1 messages · Page 1 of 1 (latest)

barren briar
#

Hey y'all, I'm following a simple movement script tutorial for enemies in my game. I'm a little confused because my enemies will move to the player location when I am within range, but they move through walls, and collision objects, and collide with the player and other enemies.

the code is shown in the image

visual vale
#

that just moves directly to the player, yeah

#

if you want it to have physics/collision, give it a rigidbody/rigidbody2d and corresponding collider, and move using that rb