Sprite Size and Physics Size do not match?

I create a 3000 pixel by 1500 pixel sprite race track in Photoshop. I use Photoshop grid lines to see where all points are that defines my track edges

I then use PhysicsBody::createEdgePolygon to create a set of edges. I gather my points by referring to Photoshop and the grid lines

But my sprite size and physics body are exactly 1.7 un aligned. I have to divide every point measurement by 1.7 for them to match

Screen size doesn’t matter as following vehicle

No idea why its 1.7 out of scale. The image/sprite is coming in smaller

Further explained -> I look at my Photoshop image and mark a point Point(-2000, 100)
I then add this as a point for my edge body. But its 1.7 scaled larger. They all are excatly 1.71.

Thanks Guys

Someone help me

@slackmoehrle ->setGuidance(GaddMaster);
cocos2d::String result = “MuchRespect”;

return result;

@GaddMaster

I -> quoteYoda("Difficult to see. Always in motion is the future..”); 

Can you PM me your PSD and your code you are using and I can test on my end too?

Bumb :frowning:

oh, still an issue?

Yep. Still looking to add a large image and it always stay in pixel terms, not scale in any way. Its like we add a image at 1200 x 800 resolution. We know the image is 6000 x 3000 pixels. We then use that image grid from Photoshop like share in image below to find all the points we need to the edge physics body like so
trackInPhysics = PhysicsBody::createEdgePolygon(trackOutArray, 58, PhysicsMaterial(1, 1, 1), 10);
trackOutPhysics = PhysicsBody::createEdgePolygon(trackOutArray, 58, PhysicsMaterial(1, 1, 1), 10);
These are the inside and outside wall that the cars will race on

The problem is when we change the resolution size the sprite scales crazy. In fact we have to divide every point by 1.71 with 1200 x 800. We just want the sprite to stay using pixels no matter what, no scaling of any sort. So small resolution will simple see less of the sprite

is this in your repo?

yep called first scene , let me just push a new few bits

ok I’ll take a look.

one sec , making new push

Ready to go

One thing you’ll notice is everything physics value is divided by 1.71 to make the physics points match the sprite. It seems when you change the resolution, the physics points remain consistent while the sprite scales out of sync of physics points

:disappointed_relieved:nothing makes any sense

I’ve never had to do anything to change the Physics Body size, IIRC. I set the size to the content size of the Sprite I am using it with. Let me clone your repo tonight. I noticed that your project doesn’t compile on OS X by default last time I cloned it.

I only compile for windows, know nothing about OS X… So are you saying, I have a 1000 x 1000 pixel square in photoshop. I save it as PNG and bring it into y scene as a spite. Then make a physics edge using 4 points , the corners->Origin is center as usual for my sprites
Vec2(-500, -500)
Vec2(500, -500)
Vec2(500, 500)
Vec2(-500, 500)

That them points should perfect fit sprite ? Thats normal stuff right ?

Any idea yet what the problem is ? :cry:

Save me slack ? Please ? :frowning: