1 decade ago by anthony
Hi,
I'm trying to move a collision box so that it is in the centre of an Entity - the reason for this is that I want a projectile to pass into the Entity before changing direction.
I have an Entity with an image size of 40 x 44 and the collision box size is set at {x:20, y:22}. Using the debug mode I can see that the collision box is at the correct dimensions but I can't find a way to move it in relation to the Entity.
I tried to use offset but that also moves the image and not just the collision box itself. I'm hoping there's a way to do this and I don't have to write my own code into the Entity's check() function!
Any help is greatly appreciated!
Thanks,
Anthony
I'm trying to move a collision box so that it is in the centre of an Entity - the reason for this is that I want a projectile to pass into the Entity before changing direction.
I have an Entity with an image size of 40 x 44 and the collision box size is set at {x:20, y:22}. Using the debug mode I can see that the collision box is at the correct dimensions but I can't find a way to move it in relation to the Entity.
I tried to use offset but that also moves the image and not just the collision box itself. I'm hoping there's a way to do this and I don't have to write my own code into the Entity's check() function!
Any help is greatly appreciated!
Thanks,
Anthony