I’m making a game with pretty basic rpg like movement.
And im having some trouble with wall collision.
I have it to where their is always a ball in front of the player checking for a wall.
If it sees one then it stops the player from moving in that direction.
The issue is that I don’t know how to get it to desern normal objects from walls.
I could add each individual wall into the code by hand but that feels redundant and way too time consuming.
So I was wondering if their is any way to give the object a kind of classification that can be checked to tell that it’s a wall.
Like a
if (this.hits(var.wall)) [xdirectionavalible=false]
Where the object can hold that variable to be checked.
Sorry if this dosent make sense. I’m not entirely sure how to explain it