Thread: angle of player
View Single Post
  #3  
Old 08-17-2003, 05:59 AM
TribulationStaff TribulationStaff is offline
Registered User
Join Date: Jul 2003
Location: Pennsylvania
Posts: 368
TribulationStaff is on a distinguished road
Send a message via AIM to TribulationStaff
Quote:
angle = getangle(playerx-centerx,playery-centery)
I always forget, such that I need to play with it to figure it out. Anyway, because graal is weird and the y-axis is inverted from the cartesian plane, I believe you need centery-playery in teh second bit...*thinks* or was it you needed to use -sin? One way or the other.

As for the spiraling effect, well you are going to need to do some sort of += on the x and the y that is based upon teh angle from the center of the whirlpool. Yay trigonometry!

[edit] the second bit is rather inefficient, needing four versions when one would probably do[/edit]
__________________


Help me keep scripting
Reply With Quote