Hello!
We want to shoot a ball towards a specific direction using user touch events. The ball should hit another physics objects. The problem arises when we scale the group of the physics objects which the ball should hit.
if we do not scale the ball the collisions do not work.
If we scale the ball and the group also the collision work but the ball is not shot from the right place(event.yStart and event.xStart have changed).
How can we solve this?
thanks in advance
You can neither scale groups nor move them and have physics work consistently.
All groups must have the same scale and coordinates.
Additionally, scaling the display object has no affect on the body.
Read the snippet in the ‘important’ box on this page:
https://docs.coronalabs.com/guide/physics/physicsSetup/index.html#physics.setdrawmode
Set hybrid draw mode to see what I mean.
https://docs.coronalabs.com/api/library/physics/setDrawMode.html
Hello!
Thank you for your help that clarified things a lot.
You can neither scale groups nor move them and have physics work consistently.
All groups must have the same scale and coordinates.
Additionally, scaling the display object has no affect on the body.
Read the snippet in the ‘important’ box on this page:
https://docs.coronalabs.com/guide/physics/physicsSetup/index.html#physics.setdrawmode
Set hybrid draw mode to see what I mean.
https://docs.coronalabs.com/api/library/physics/setDrawMode.html
Hello!
Thank you for your help that clarified things a lot.