SFML community forums

General => General discussions => Topic started by: Dark Byte on July 02, 2011, 03:51:40 pm

Title: Need help with scaling Box2D coords
Post by: Dark Byte on July 02, 2011, 03:51:40 pm
Hi, I cannot convert the Box2D coords to pixels. Everything I have tried does the same just on a different scale. Does anyone know how to convert them?
Title: Need help with scaling Box2D coords
Post by: Dark Byte on July 02, 2011, 07:34:12 pm
Nvm it is fixed  :)
Title: Need help with scaling Box2D coords
Post by: keyforge on July 02, 2011, 07:36:09 pm
Screen Width / Meters Width = DeltaX
DeltaX * Box2D Coords

Screen Height / Meters Height = DeltaY
DeltaY * Box2D Coords

Not sure if this is what you're asking for, but I recommend keeping it in meters because using pixels with Box2D can mess stuff up, unless of course you know what you're doing.

Edit: Oh, you beat me too it...