Hi there,
i need to create my objects always new (as i have to change its size after a collision)
My problem right now is, that the object is not set at the exactly position from the old object,
its always somehow set a few pixels beside.(this is just an excerpt i need all object values, so i work with that dummy object)
Here my test code:
– create the original object and add a body
testcircle = display.newCircle( 10,100, 10 )
physics.addBody(testcircle, { density=10, friction=0.1, bounce=0.0, radius = 10} )
– copy all values from that object into a dummy object
dummyobject = testcircle
– remove the old Object & Body
physics.removeBody (testcircle)
testcircle:removeSelf()
– set the new object at the saved values
testcircle = display.newCircle( dummyobject.x, dummyobject.y, 10 )
physics.addBody(testcircle, { density=10, friction=0.1, bounce=0.0, radius = 10} )
as you may see, first object is created exactly at 10,100 but the new one kind a 15, 100
thx
chris
[import]uid: 4795 topic_id: 15359 reply_id: 315359[/import]
for sure i tested that before