Hi , i got problem…
If i create a new image and add physics body to it , its applied just on small part of it.
I recorded it on video and upload it on yt:
https://www.youtube.com/watch?v=FApGoNTqTq0&feature=youtu.be
at 0:08 you can see where is physic body applied and at 0:16 you can see my problem.
Code:
------------- loading images and applying physics here ------- local hero\_1 = display.newImage( "heroes/yellow/idle.png"); hero\_1:scale(1.2\*mp\_w,3.4\*mp\_h); hero\_1.x = 240\*mp\_w; hero\_1.y = 350\*mp\_h; hero\_1.myName = "hero" local brick1 = display.newImage("brick\_1.png") brick1:scale(0.5\*mp\_w,1.5\*mp\_h); brick1.x = 350\*mp\_w; brick1.y = 550\*mp\_h; physics.addBody( hero\_1 , "dynamic",{ density=0, friction=0, bounce=0, radius=0 } ) physics.addBody( brick1, "static", { friction=10, bounce=1 } ) -------- Hero move -------- local function moveguy (event) hero\_1.x = hero\_1.x + motionx; end Runtime:addEventListener("enterFrame", moveguy) ---------------------------
Thanks for reply