I want all my objects but one to be affected by gravity. Is there a way to void it out for a certain object?
Label: corona android iphone ipad building error inmobi problem display screen View image tableView failed object physics touch button game lua config event listener |
Allow A Object To Not obey Gravity
You can set bodyType to "static" or "kinematic".
http://developer.anscamobile.com/reference/index/bodybodytype
Or you can just not add a physics body to it.
The problem with that is that if you make one object kinematic or static, you run into problems with the object not colliding with other objects anymore.
For example, if you have a bunch of static objects that define the walls or terrain in a game, and you want your flying object to not respond to gravity, and you set it as kinematic, it'll pass through the terrain.
It's not impossible to solve the problem, but it requires a lot of extra work compared to if you could just have a "respondsToGravity=false" flag...
An alternate solution would be to keep things dynamic, but turn off gravity and simulate gravity by adding a force in each enterFrame
good luck!
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
Facebook on Android?
Why have two SDK versions? (one for subscriber and one for non-subscriber)
Walk through request - removing permissions
How do you remove physics effects from a function?
Problem with translating images in a table
different sized tiles on same map
Adding external SDK that is made up of XCode files into Corona app
New Corona iOS App Available - HamsterDoodle
Which library ui or widget?