Ok, down to the facts:
I am having a camera that follows my player around the game world.
In that game world he picks up gems and I am trying to position a particle effect around every gem he collects. But I can’t get the position…I have tried all I can think of, contentToLocal, LocalToContent, etc.
First is the camera :
gameGroup.x = (ball.x \* -1)+240
if(ball.y\<220) then
if(ball.y\>-100) then
gameGroup.y = ((ball.y \* -1) +220)-5
ball.jumping = true
end
end
As you see, i center my camera around the player straight in the middle of the screen. If he climbs upward I start to follow him in that direction.
Next code is where I am trying to place my particle effect…
local x\_local, y\_local = gameGroup:contentToLocal(mySprite.x, mySprite.y)
Particles.CreateEmitter("E" .. particleCount, x\_local, y\_local, 0, false, false)
Help! Any suggestion?
Best regards, Joakim [import]uid: 81188 topic_id: 20926 reply_id: 320926[/import]
[import]uid: 54716 topic_id: 20926 reply_id: 82760[/import]