View Single Post
  #9  
Old 08-28-2008, 10:40 PM
DrakilorP2P DrakilorP2P is offline
Registered User
DrakilorP2P's Avatar
Join Date: Apr 2006
Posts: 755
DrakilorP2P is just really niceDrakilorP2P is just really nice
Quote:
Originally Posted by GULTHEX View Post
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)
Reply With Quote