Ok so the offsets of the body is constantly changing because it doesn’t respect
the pivot point. Each time that i change the body then the texture reposition itself according to the body, but Phaser is generating the body’s offsets based on the height /width of the body shape and not based on the height/width of the texture. It shouldn’t work like that, Phaser should place the body according to only one pivot point and it should be the one generated by Texture Packer. Each vertex point a bit placed too righly, leftly, uply or downly with PhysicsEditor, make the body offset completely different, causing texture jittering.
This is why when i create a body with one vertex placed at the top of the 240x240px frame (like on my picture above) then the texture and body is placed at the same place, but like i said it’s not a solution, it only shows that Phaser need improvements at this subject.
So now i have to code a solution to do a correction of the offsets at each frame, because i have many ships and it would be too long to rework all the vertexes created by PhysicsEditor to check those which make the body a pixel righter or lefter. Or i’ll try to change Phaser code source.
Phaser should create the offsets of the bodies by thinking “hey, the pivot point of the Texture is 0.5 of 240px, so the offset of the body is 0.5 of 240px”.
(for example, when i turn my ship at 360° then it uses 90 different textures and bodies, one at each frame, and at each of these frames the offsetX of the bodies is going up from 0.530000000 to 0.58000000, but some offsets isn’t going up but down, and this because like i said Phaser is generating the body offsets by calculating the distance between the vertexes… which is different from the height and width of the texture when calculating the offset of the texture. Phaser shouldn’t do that)
Thank to improve the framework please.