I'm currently running into an issue with terrain tags.
Right now, I'm working on a timed challenge in my game, DashBored.
I'm using GaryCXJk's Free Movement script to have pixel movement.
Every second, a series of Electrical panels will turn on, and the game runs a check to see if the player is standing on one of the panels. If the player is standing on one, they will take damage.
This has become a problem because the game seems to check the terrain tag in a bizarre way, only checking if the top of the player is in the terrain, rather than the actual hitbox.
here's a screenshot of a debug room.
As you can see, the player's hitbox is directly on the tile with the terrain tag that should cause damage.
However, since the player's head isn't in, it doesn't register.
Here, on the other hand, the player's hitbox is completely outside of the terrain tag, but it still registers the player as being within the terrain tag, and applies damage.
Any idea for why this could be happening? Is there any possible way to fix this?
Right now, I'm working on a timed challenge in my game, DashBored.
I'm using GaryCXJk's Free Movement script to have pixel movement.
Every second, a series of Electrical panels will turn on, and the game runs a check to see if the player is standing on one of the panels. If the player is standing on one, they will take damage.
This has become a problem because the game seems to check the terrain tag in a bizarre way, only checking if the top of the player is in the terrain, rather than the actual hitbox.
here's a screenshot of a debug room.
As you can see, the player's hitbox is directly on the tile with the terrain tag that should cause damage.
However, since the player's head isn't in, it doesn't register.
Here, on the other hand, the player's hitbox is completely outside of the terrain tag, but it still registers the player as being within the terrain tag, and applies damage.
Any idea for why this could be happening? Is there any possible way to fix this?