-
-
Notifications
You must be signed in to change notification settings - Fork 18
move_towards_point
drewmccluskey edited this page Feb 10, 2019
·
4 revisions
Move object towards a given position at a rate of pixels per step
move_towards_point(point, pixels)
Argument | Description |
---|---|
Vector point |
Target position |
double pixels |
Pixels to move per call |
Returns: void
This function will move your GameObject to the given position by a number of pixels as specified.
move_towards_point(new Vector2(2, 0), 4);
The above code will move GameObject towards the left upper corner at a rate of 4 pixels per call.
Back to Movement