-
-
Notifications
You must be signed in to change notification settings - Fork 18
mp_linear_step
CryoEagle edited this page Feb 11, 2019
·
1 revision
Returns false when colliding while moving with object
mp_linear_step(Goal, StepSize)
Argument | Description |
---|---|
Vector2 Goal |
Target position to move |
int StepSize |
Pixels to move per call |
Returns: bool
This function will move with an object to a target position if an object will collide with another instance, a function will return false.
if (mp_linear_step(new Vector2(10, 10), 20) == false)
{
show_message("hello world");
}
Above code will move with an object to X: 10, Y:10 if there will be an object in a way function will return false
.
Back to Motion Planning