Gun circling actor?

Game Editor comments and discussion.

Gun circling actor?

Postby GuitarManGuitar » Sat Oct 27, 2007 8:35 pm

I made a gun with 16 22.5 rotations.
I want it to circle the guy insted of staying
in the middle of him and spinning.
Sooo....what kind of equation would i put? :?
GuitarManGuitar
 
Posts: 31
Joined: Thu Oct 25, 2007 11:57 pm
Score: 0 Give a positive score

Re: Gun circling actor?

Postby Game A Gogo » Sat Oct 27, 2007 11:27 pm

draw actor:
Code: Select all
x=cos((angle/360)*6.28)*10;
y=sin((angle/360)*6.28)*10

I'm not sure if it will work
cahnge 5the *10 for the distance from the middle. if needed, add a +10 or anynumber oyu need to positionate the gun
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Re: Gun circling actor?

Postby GuitarManGuitar » Sun Oct 28, 2007 2:38 am

tysm ur a genious!
:mrgreen:
:mrgreen:
:mrgreen:
:mrgreen:
:mrgreen:
:mrgreen:
GuitarManGuitar
 
Posts: 31
Joined: Thu Oct 25, 2007 11:57 pm
Score: 0 Give a positive score

Re: Gun circling actor?

Postby Game A Gogo » Sun Oct 28, 2007 2:52 am

It worked? also, I forgot a ";" at the end of the second line
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron