Difference between revisions of "API Panel.Collision"
From Flowcode Help
Jump to navigationJump to search (XML import) |
|||
Line 30: | Line 30: | ||
==Examples== | ==Examples== | ||
− | + | ===Detecting Collisions=== | |
+ | |||
+ | Simple example showing how to detect for collisions between objects on the panel. An object moves back and forth between two fixed objects. Each time the moving object hits a static object it will change it's direction. | ||
+ | |||
+ | {{Fcfile|Collide.fcfx|Collide}} | ||
==See also== | ==See also== | ||
''<span style="color:red;">No additional information</span>'' | ''<span style="color:red;">No additional information</span>'' |
Latest revision as of 15:12, 11 May 2016
<sidebar>API Contents</sidebar> Collision detection functions
This class is contained within Panel.
Functions provided for this class
TestTable | Tests whether an object collides with the table top, returns Z distance to move to rest on the table |
TestSingle | Tests whether an object collides with a position |
GetSingleAxis | Tests whether an object collides with a position |
GetSinglePos | Returns the position to move Pos to so it does not collide with Test - null if no collide |
GetMultiAxis | Tests whether an object collides with a position |
GetMultiPos | Returns the position to move Pos to so it does not collide with any other object - null if no collide |
Examples
Detecting Collisions
Simple example showing how to detect for collisions between objects on the panel. An object moves back and forth between two fixed objects. Each time the moving object hits a static object it will change it's direction.
See also
No additional information