Quote:
Originally Posted by GULTHEX
how do i freeze my player and update there possition???
|
You can prevent the current player from moving using freezeplayer(t), where t is the amount of time the effect should last.
As for position, Graal uses the two-dimensional Cartesian coordinate system to describe positions as points in the Euclidean space.
The following image visualizes this in a clear manner.
You can translate an object thusly:
(x, y) -> (x + dx, y + dy)
Conversely:
x' = x + dx
y' = y + dy
To rotate about the origin:
Or:
x' = x * cos(theta) - y * sin(theta)
y' = -x * sin(theta) + y * cos(theta)