Physics and Origin

Bugs will be moved here once resolved.

Post » Mon Dec 19, 2011 12:22 pm

Hey guys,

I'm playing around with the physics. I want to dynamically create some scenery, on start of layout.

I have a rectangle sprite called "ground", I placed its "Origin" in the top left corner. I want to resize this ground sprite so that it covers the lower part of the screen.

But what I found is that when I add the Physics behavior, the origin seems not to be taken into account when placing objects at X/Y coordinates.

Is this the expected behavior? (I tried to find references on this site, but could not).

For exemplification here's a simple capx with the minimum to explain this.

I create 2 sprites dynamically, GroundWithPhysics and GroundWithoutPhysics. They have the same origin (top left corner), but they get placed differently on the X axis (perhaps on the Y axis too).

Is this expected? If yes, why?

Thanks in advance.

Edit: Forgot the capx link: http://www.mediafire.com/?p7tvxk8k2nlnrybGeo2011-12-19 12:22:39
B
14
S
5
G
7
Posts: 235
Reputation: 5,175

Post » Mon Dec 19, 2011 4:58 pm

Sounds like it might be a bug, moving to bugs forum to check out later.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Post » Mon Dec 19, 2011 8:57 pm

Thanks. Looking forward to the fix then :)
B
14
S
5
G
7
Posts: 235
Reputation: 5,175


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 7 guests