The Daily Click ::. Forums ::. Klik Coding Help ::. rotating objects
 

Post Reply  Post Oekaki 
 

Posted By Message

bladeboy



Registered
  25/07/2003
Points
  724
14th March, 2004 at 07:51:46 -

Hi. I need to make an object rotate around another object you know like a shield that spins around your ship in a shooter.
i know ive read how to do it here but i cant find anything when i search.
does anyone have an example or know the maths for it or simply know what to search for, like an article namne ect.

 
http://www.geocities.com/monkyjungle

The Chris Street

Administrator
Unspeakably Lazy Admin

Registered
  14/05/2002
Points
  48488

Game of the Week WinnerClickzine StaffAcoders MemberKlikCast StarVIP MemberPicture Me This Round 35 Winner!Second GOTW AwardYou've Been Circy'd!Picture Me This Round 38 Winner!GOTM December Third Place!!
I am an April FoolKliktober Special Award Tag
14th March, 2004 at 08:23:43 -

If you have MMF 1.5 then you can download the Orbit Extention. Else you'll have to learn trig

 
n/a

Cazra

Crazy?

Registered
  24/07/2002
Points
  4472

Game of the Week WinnerVIP Member
14th March, 2004 at 10:01:21 -

Use the Advanced Math object. Then put in the following events:

>start of level
-set decimal offset(advanced math object) to 3

>always
-add 1 to shield's alterable value A
-set X position of shield to ( X of player+([distance from player] * Cosine(sheild's value A))/1000)
-set Y position of shield to ( Y of player+([distance from player] * Sine(sheild's value A))/1000)

>if shield's value A >360
-subtract 360 from shield's value A

Trig may be confusing. If you can't figure out what the following code does, just plug it in and don't worry about it for now.

 
n/a

bladeboy



Registered
  25/07/2003
Points
  724
14th March, 2004 at 12:50:35 -

thank you

 
http://www.geocities.com/monkyjungle
   

Post Reply



 



Advertisement

Worth A Click