table transition group

No, not the way you’re doing it.  I never add physics bodies to groups, only to tradition display objects.  So, I don’t know what to tell you about that technique.

However, there is a better way to achieve what you’re doing if the body will NOT rotate:

local physics = require("physics") physics.start() local players = {} for i = 1, 5 do local player = display.newCircle(100 + (i-1) \* 15,200,10) players[i] = player physics.addBody( player, { density=.5, friction=1, bounce=0.7,shape=pentagonShape } ) player.isFixedRotation = true player.head = display.newCircle(0,0,5) player.enterFrame = function( self ) if( self.removeSelf == nil or self.head.removeSelf == nil) Runtime:removeEventListener("enterFrame", self ) return end self.head.x = self.x self.head.y = self.y - 20 end Runtime:addEventListener("enterFrame", player ) end

Hi, i would know how to access a specific player with this code because

player[2]:setFillColor(1,0,0) doesn't work...

local physics = require("physics") physics.start() local player={} for i = 1, 5 do local players=display.newGroup() players.body = display.newCircle(players,0,0,10) players.head=display.newCircle(players,0,-20,5) players.x = 100 + (i-1) \* 15 players.y = 200 player[i] = players end physics.addBody( player[2], { density=.5, friction=1, bounce=0.7,shape=pentagonShape } ) player[2]:applyForce( 80, 150, player[2].x, player[2].y ) player[2].isFixedRotation=true

thanks if you could help me

Nobody for my previous question ?

hi espace3d,

i can’t help you…maybe start a new post ?

@espace3d,

Please do not hijack someone’s thread.  Start your own.  If you have a question that contributes to an ongoing discussion as posed by the original person that is fine.  If you’re looking for help for your own issue, that is not fine.

Adding your own new question because you think it is somehow related is (very) bad forums etiquette.

You shouldn’t get an answer as that only encourages this behavior.  Imagine a forum where everyone posted their questions into random threads… chaos.   :o

Please re-post your question as a new and detailed forums post with an appropriate tittle…

PS - If you think a discussion is partially relevant to your question, link to it in your new post and say “I think this discussion might be related, but I’m still confused/stuck”, just don’t hijack.