move_contact_object - hpgDesigns/hpgdesigns-dev.io GitHub Wiki
NOTOC
Moves the instance in the direction (angle) until a contact position with the specified object is reached. If there is no collision at the current position, the instance is placed just before a collision occurs. If there already is a collision the instance is not moved. dist specifies the maximal distance to move. precise is optional (default false), when true moves within 0.000001 of an instance, when false moves with 1 of at instance. solid_only is also optional (default false), specifies whether to only collide against solid objects.
- angle the direction to move contact in
- dist the maximum distance to move. when set to -1 does not set a maximum distance
- object objects to check moving against. can be an id, object index of keyword all
- solid_only whether to only move against solid instances or not (optional, default set to false)
returns the distance the instance has moved
//moves the instance down until colliding with an obj_block instance
move_contact_object(270, -1, obj_block);