F
FuturityUK
Guest
Hi All,
When are the bbox values recalculated? I've got a diagonal sprite detection issues and it feels like the bbox values aren't being updated when I change the "y" variable. Is this true?
I've followed a number of tutorials about platform games. I'm an experience programmer in Java etc, so it shouldn't be a simple mistake, just a miss understanding of the GMS2 function behaviour.
My horizontal and vertical collision is working fine, but when I jump diagonally, slightly above the vertical detection point into a tile, the sprite goes into the tile a fair way before being pushed back.
To make sure the problem isn't due to the tile mask, its currently solid (no gaps at all). In fact filling in the mask has made no difference.
I add the movement to Y, test Y axis bbox collision, then change Y to align to the tileset grid. I then immediately afterwards the X axis by add the movement to X, test the X axis bbox collision, then change X to align to the tileset grid.
On the basis of the Y being change first, then the X being changed second, it should avoid any diagonal issues?
Any idea whats going on? Are the bbox values only being updated outside the object.step code?
Thanks for any help
Futurity
When are the bbox values recalculated? I've got a diagonal sprite detection issues and it feels like the bbox values aren't being updated when I change the "y" variable. Is this true?
I've followed a number of tutorials about platform games. I'm an experience programmer in Java etc, so it shouldn't be a simple mistake, just a miss understanding of the GMS2 function behaviour.
My horizontal and vertical collision is working fine, but when I jump diagonally, slightly above the vertical detection point into a tile, the sprite goes into the tile a fair way before being pushed back.
To make sure the problem isn't due to the tile mask, its currently solid (no gaps at all). In fact filling in the mask has made no difference.
I add the movement to Y, test Y axis bbox collision, then change Y to align to the tileset grid. I then immediately afterwards the X axis by add the movement to X, test the X axis bbox collision, then change X to align to the tileset grid.
On the basis of the Y being change first, then the X being changed second, it should avoid any diagonal issues?
Any idea whats going on? Are the bbox values only being updated outside the object.step code?
Thanks for any help
Futurity