Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
26 May, 2013, 01:53:08 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: 1 ... 84 85 [86] 87 88 ... 110   Go Down
  Print  
Author Topic: Axe Q&A -  (Read 59543 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
jacobly
LV4 Regular (Next: 200)
****
Offline Offline

Last Login: Yesterday at 21:17:40
Date Registered: 09 October, 2011, 01:53:09
Posts: 199

Total Post Ratings: +149

View Profile
« Reply #1275 on: 31 December, 2011, 21:06:55 »
+1

Data(33,34,26,18,35,27,19,36,28,20)->GDB0
While 1
getKey->K
inData(K,GDB0)->r1
EndIf r1

Data(33,34,26,18,35,27,19,36,28,20,0)->GDB0
While 1
getKey->K
inData(K,GDB0)->r1
EndIf r1

Fixed.

Ok I have a feeling I'd be able to firgure this out myself, but it would prolly take a while since I don't remember much from math Tongue

Anyway, so I have a projectile flying at (S,T) with an angle, Z.  If Z is zero it faces straight down, 256 degrees, etc.
I have an enemy at, say, (X,Y).  How would I check which side of the projectile the enemy is on (right or left), related to the projectile's angle?
tan⁻¹(S-X,T-Y)-Z^256<128 should be true if the projectile needs to rotate in the positive direction.
tan⁻¹(S-X,T-Y)-Ze0 is optimized but returns the opposite.
Logged
Pages: 1 ... 84 85 [86] 87 88 ... 110   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.201 seconds with 31 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.