1 decade ago by paulh
Hi All
So i have an entity which is generated from a sprite sheet. When a bullet hits the entity i want to split the entity sprite into a maximum of four pieces and for those pieces to move taking into account the point of impact (c what i did there!)
http://postimage.org/image/4s0hlvh7l/
In this image ABCD = the entity sprite at say 100x100 (displayed as one sprite)
The sprite is one of 100 in a 1000X1000 sprite sheet.
A bullet impacts at the bottom left of the sprite so i want to split the sprite into 4 pieces (ABCD) and for their trajectory to be North Easterly but them to move independently.
The example above is just for this posts purpose.
Any hints on the approach to do this?
So i have an entity which is generated from a sprite sheet. When a bullet hits the entity i want to split the entity sprite into a maximum of four pieces and for those pieces to move taking into account the point of impact (c what i did there!)
In this image ABCD = the entity sprite at say 100x100 (displayed as one sprite)
The sprite is one of 100 in a 1000X1000 sprite sheet.
A bullet impacts at the bottom left of the sprite so i want to split the sprite into 4 pieces (ABCD) and for their trajectory to be North Easterly but them to move independently.
The example above is just for this posts purpose.
Any hints on the approach to do this?