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.

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  
  

try to put the deg in the last line. Please help me!! [import]uid: 30837 topic_id: 6768 reply_id: 306768[/import]

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. [import]uid: 5833 topic_id: 6768 reply_id: 23621[/import]

Is it possible to add one anchor point through the map and the static objects?
This could be a solution, no?
Thanx [import]uid: 30837 topic_id: 6768 reply_id: 24223[/import]

I will have a look into it, thanks for the idea :slight_smile: [import]uid: 5833 topic_id: 6768 reply_id: 24238[/import]

mashiro, can you remove that link now please. [import]uid: 6645 topic_id: 6768 reply_id: 24472[/import]

.removed. [import]uid: 30837 topic_id: 6768 reply_id: 23618[/import]

removed, but why? can you explain me? [import]uid: 30837 topic_id: 6768 reply_id: 24478[/import]

you left Lime in it

thanks [import]uid: 6645 topic_id: 6768 reply_id: 24485[/import]

i’m so sorry!! excuse me…
i’m sure you’re the first who download it… :stuck_out_tongue:
I’m so sorry… [import]uid: 30837 topic_id: 6768 reply_id: 24496[/import]

No worries, easy mistake. We all know I’ve made a few :slight_smile:

Good catch there J, thanks! [import]uid: 5833 topic_id: 6768 reply_id: 24894[/import]

Hi graham, did you fix the rotation’s problem? [import]uid: 30837 topic_id: 6768 reply_id: 27040[/import]

Could you please send me an example project showing the problem again? [import]uid: 5833 topic_id: 6768 reply_id: 27314[/import]

i’ll send you an email.
Really thanx :slight_smile: [import]uid: 30837 topic_id: 6768 reply_id: 27320[/import]

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? [import]uid: 5833 topic_id: 6768 reply_id: 27851[/import]