Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Box 2D Image positioning problems

Author
Message
z i l c h vortex
19
Years of Service
User Offline
Joined: 20th Feb 2007
Location: united kingdom
Posted: 22nd Nov 2010 02:32
In box 2d when position my images to objects they seem to not fit to the objects as you can see in the image.

Does anybody know what this is?
the cursor circle lines up with the circle shape but the image doesn't when i use the b2setbodyimage command.





Thank you.

life is short but so am i
Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 22nd Nov 2010 15:38
Images are centered at 0,0 relative to the body they are attached to. ie. If you specify a local position of 0,0 when you create the circle shape on the body, the image should fit the circle perfectly.

[b]
z i l c h vortex
19
Years of Service
User Offline
Joined: 20th Feb 2007
Location: united kingdom
Posted: 22nd Nov 2010 20:20
Thank you diggsey!!!

life is short but so am i

Login to post a reply

Server time is: 2026-07-21 18:37:55
Your offset time is: 2026-07-21 18:37:55