Moves a 2D coordinate the specified percentage towards another coordinate.
lerp(coord, percentage);
Parameter |
Description |
coord |
Can be SGCoord2D, SGCoord3D or SGPosition |
percentage |
The percentage to move (0.0 – 1.0) |
Return Value
An SGCoord2D object that represents the new position after the move.
Remarks
Because SGCoord2D class does not have a height property, specifying coord other than SGCoord2D will result in moving the coordinate in a 3D space and then returning only the x and y properties of the new coordinate.