The Daily Click ::. Forums ::. Klik Coding Help ::. 360 movement
 

Post Reply  Post Oekaki 
 

Posted By Message

Ganymede Graphics

Possibly Insane

Registered
  17/04/2006
Points
  2711

GOTW JANUARY 2011
24th November, 2006 at 20:41:11 -

Does anyone have a step by step article or manual to making 360 degree movement. Pretty new to the stuff, i've looked at the articles but i havent really come to understanding them very well.

 
Especially that.

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
24th November, 2006 at 20:53:18 -

http://www.create-games.com/cs_search.asp
http://www.google.com/search?as_q=360+degree+movement&num=10&hl=fi&btnG=Google-haku&as_epq=&as_oq=&as_eq=&lr=&as_ft=i&as_filetype=&as_qdr=all&as_occt=any&as_dt=i&as_sitesearch=create-games.com&as_rights=

Image Edited by the Author.

 
n/a

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
24th November, 2006 at 21:02:15 -

its actually fairly simple.

Just download the Advanced math object, have the Value A of your object be its direction (angle from 0-360)

When you want it to go forward, have its x/y positions be set to "Xpos(AO) + "Sin from A-math object (Value A(AO))" / "Decimal offset of A-math object", and likewise with y using cosine instead of sine.

For left/right and backwards, simply use (Value A(AO) + 90, +180, and +270), respectively.

Can easily be done in just 1 line of code.

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

Werbad



Registered
  18/09/2002
Points
  235
25th November, 2006 at 05:50:01 -

In MMF Cos and Sin are built in and you won't need any extensions..

 
n/a
   

Post Reply



 



Advertisement

Worth A Click