I’m making an enemy npc that will hit a wall and then move back in the direction it came from. When implimenting this i want the collision group for the enemies hitbox to change to the other side of the enemy.
So i produced the below code which should flip the collision group on the x axis when the velocity is less than 0 which is caused by the enemy hitting a wall:
physics.set_hflip("enemy:/enemy#enemy_hitbox", self.movement < 0)
But i got the error:
does anyone know how i could possibly fix this???