physics - Corona SDK and moving objects -


i have shapes (rectangle) in game , want implement - when shape object pressed small amount of time , pushed in direction should move small distance pressing shape longer time should moved large distance ( means depending on pressure put on shape , when thrown should move distance relative pressure applied.

regards

you can break problem 2 pieces:

  1. while object being pressed, accelerates (so longer pressed greater speed gets to).
  2. as travels, decelerates @ constant rate (so faster it's going @ beginning, longer keeps moving, , farther moves before stops).

now have implement velocity , accelaration, pressure , drag.

if approach doesn't give appearance want, there ways modify it.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -