Hi,
I am currently working on a game were a user needs to flick a object across the screen. I am currently using the Gameui.lua to move the object across the screen but was wondering if there was a better way to do this.
Also please take note I am doing this in a 0 gravity environment because you look down on the game, simular to the pool sample code. The only difference is I want the object to not fly all over the screen but to move a short distance an stop. Any suggestions on this would be welcome.
You could try adjusting the physics properties of the object, like setting linear damping, friction, density, etc.
myObject.linearDamping = 10
playerMaterial = { density = 2.0, friction = 10.0, bounce = 0.0}
Give it a try!
-Mario
I tried setting the lineardamping property but it appears to have no affect. Any idea why?
Are you moving the object with force or linearVelocity?
Take a look at the MultiPuck example, that may be closer to what you want.
CoronaSDK > SampleCode > Physics > MultiPuck.
Peach :)
I am using the gameUI.dragBody code from MultiPuck, the problem is now that the user can keep dragging the object. For instance into the goal, instead of flicking it in...