×
A new build of Corona SDK is now available to subscribers. Not a subscriber? Subscribe now.
CoronaSDK 2014.2472 | Released: 23 Oct 2014, 11:07am | What's New | Download Now

physics.setPositionIterations()

Description:

Sets the accuracy of the engine's position calculations.

Syntax:

physics.setPositionIterations( value )

Example:

physics.setPositionIterations( 16 ) -- changes iterations from the default value of 8

Parameters:

value
Iteration value. The default value is 8, which means that the engine will iterate through eight position approximations per frame for each object. Increasing this number will cause fewer momentary inaccuracies (overlapping objects. etc.) but will increase computational overhead. The default value should be good for most general cases.

Returns:

Nothing.

Remarks:
Supported on operating systems and platforms for build numbers shown:
  • Mac OS X:
    Corona SDK 2.0
  • Windows:
    Corona SDK 2.0
  • iOS:
    Corona SDK 2.0
  • Android:
    Corona SDK 2.0