Is there a way to move an object about its axis to the direction of touch ?Suppose when I click on left the object should move to left about its axis or when I click on right side it should move to right side about its axis.
Label: corona android iphone ipad building error inmobi problem display screen View image tableView failed object physics touch button game lua config event listener |
move on touch event
Yes there is. You touch function would have to take into account the touches location relative to the object and change the rotation based on that. Its actually really simple:x = touch.x - obj.x, y = touch.y - obj.y , find degrees using artan2 and adjust rotation accordingly. You might have to add or subtract some degrees in order to get the correct rotation.
views:1371 update:2011/12/29 9:44:01
热门文章
GameCenter LeaderBoards and Achievements Enabled Through OpenFeint
send message and call to a person
Forum: Report Spam + PM
[INSTALL_PARSE_FAILED_NO_CERTIFICATES]
[SOLVED] Director ERROR: Failed to execute new( params ) function on 'screen1'
Too many (200) local variables
Corona SVG Level Builder released. Drag and drop physics level editor with Inkscape and SVG.
Small bug in Collectible Items example
Pivot Joints and apparent elasticity
Can't make removeSelf() delayed
send message and call to a person
Forum: Report Spam + PM
[INSTALL_PARSE_FAILED_NO_CERTIFICATES]
[SOLVED] Director ERROR: Failed to execute new( params ) function on 'screen1'
Too many (200) local variables
Corona SVG Level Builder released. Drag and drop physics level editor with Inkscape and SVG.
Small bug in Collectible Items example
Pivot Joints and apparent elasticity
Can't make removeSelf() delayed
相关文章
THIS TOPIC IS FOR YOU
Space Wolves are here
Director Class "Fade" Animation Cuts off Part of Screen?
Mac Apps - input devices
Pixel Manipulation In Corona
IndeED for Corona ® SDK
Do You Like Corona Project Manager?
1.2 = complete change of structure?
how to deal with zip file?
Jagged edges when transforming images
Space Wolves are here
Director Class "Fade" Animation Cuts off Part of Screen?
Mac Apps - input devices
Pixel Manipulation In Corona
IndeED for Corona ® SDK
Do You Like Corona Project Manager?
1.2 = complete change of structure?
how to deal with zip file?
Jagged edges when transforming images
corona forums © 2003-2011