Map Rotation, possible to do?

Hi, i've made a map with tiled, composed by 2 layers, one tile and one object with many static objects.
When i rotate the map with the command map.world.rotation = (xx), the tile layer rotate properly, but the statics objects doesn't rotate, they just shift holding just one point (maybe the center).

here is the code if you want to try, it's really strange.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
display.setStatusBar( display.HiddenStatusBar )
 
local ui = require("ui")
require("physics")
physics.start()
 
-- Create a background colour just to make the map look a little nicer
local back = display.newRect(0, 0, display.contentWidth, display.contentHeight)
back:setFillColor(165, 210, 255)
 
-- Load Lime
local lime = require("lime")
 
-- Load your map
local map = lime.loadMap("primamappamostri2 copy 2.tmx")
 
local visual = lime.createVisual(map)
 
-- Build the physical
local physical = lime.buildPhysical(map)
 
--      local angleMag = event.magnetic 
 
        map.world.rotation = 0

.removed.

This seems to be down to a limitation with Box2D and having physics bodies in different groups - http://developer.anscamobile.com/forum/2010/09/17/moving-objects-group-collision - this could be a problem. I will get back to you after I have tried the solution they have put forward.

Is it possible to add one anchor point through the map and the static objects?
This could be a solution, no?
Thanx

I will have a look into it, thanks for the idea :)

mashiro, can you remove that link now please.

removed, but why? can you explain me?

you left Lime in it

thanks

i'm so sorry!! excuse me..
i'm sure you're the first who download it.. :P
I'm so sorry..

No worries, easy mistake. We all know I've made a few :-)

Good catch there J, thanks!

Hi graham, did you fix the rotation's problem?

Could you please send me an example project showing the problem again?

i'll send you an email.
Really thanx :)

Hey, sorry was away all weekend but am back at my PC now. I believe the issue is to do with the Physics bodies being in separate groups to everything else, I may have read about an issue with this. Does anyone have a link to what I might have seen?

views:1796 update:2011/10/13 16:30:09
corona forums © 2003-2011