physics.getReportCollisionsInContentCoordinates()

Type Function
Library physics.*
Return value Boolean
Revision Release 2024.3703
Keywords physics, collision, content, space, coordinates
See also physics.setReportCollisionsInContentCoordinates()
collision
preCollision
postCollision
physics.getAverageCollisionPositions()

Overview

This function is used to determine if the content origin is the collision point in the collision, preCollision, and postCollision physics events.

Return

false (default) — One of the colliding object’s x and y location is the collision point.

true — Collisions between two objects return the specific collision point, in content origin.

Syntax

physics.getReportCollisionsInContentCoordinates()

Example

-- Toggle the collision point.
if ( physics.getReportCollisionsInContentCoordinates() ) then

    physics.setReportCollisionsInContentCoordinates( false )

else

    physics.setReportCollisionsInContentCoordinates( true )

end