The Daily Click ::. Forums ::. Klik Coding Help ::. Help with sin and cos...and angle calculator
 

Post Reply  Post Oekaki 
 

Posted By Message

..:.Phox.:..



Registered
  18/02/2005
Points
  646

VIP MemberHero of TimeI like Aliens!Cardboard BoxAttention Getter
7th July, 2006 at 09:37:12 -

hey guys

I'm making this game where you control the dude's hand with the mouse usin sin and cos and angle calculator. now while one hand is sticking directly at where the mouse is, I wanted the other hand to be doign the exact oposed thing I wanted it to be stickign AWAY from the mouse, on the oposed angle the other hand is.

here's the code for the leader hand:
<a href="http://imageshack.us">Image

the little ball thingy is the hand, the greenih thing is the player.

so now what I do to make the other hand do what I want?

can anyone help me out?

allthebest

Nathan

 
Profile edited as it messed the layout of the site up.

Radix

hot for teacher

Registered
  01/10/2003
Points
  3139

Has Donated, Thank You!VIP MemberGOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!
7th July, 2006 at 09:41:13 -

+180.

 
n/a

..:.Phox.:..



Registered
  18/02/2005
Points
  646

VIP MemberHero of TimeI like Aliens!Cardboard BoxAttention Getter
7th July, 2006 at 12:03:48 -

tried that

where do you put the +180? cuz everywhere I put it did not make it work...

 
Profile edited as it messed the layout of the site up.

David Newton (DavidN)

Invisible

Registered
  27/10/2002
Points
  8322

Honored Admin Alumnus
7th July, 2006 at 13:13:24 -

Set it to the angle of the other hand +180, rather than performing the entire calculation again.

 
http://www.davidn.co.nr - Games, music, living in America

..:.Phox.:..



Registered
  18/02/2005
Points
  646

VIP MemberHero of TimeI like Aliens!Cardboard BoxAttention Getter
7th July, 2006 at 15:29:25 -

I want to make a mirror efect so when one is pointing up the other is pointing down. and vice-versa.

Don't you have to work with sin and cos again?


 
Profile edited as it messed the layout of the site up.

David Newton (DavidN)

Invisible

Registered
  27/10/2002
Points
  8322

Honored Admin Alumnus
7th July, 2006 at 15:39:08 -

I'm still not sure what you want to happen - adding 180 degrees to the angle will fix the other hand at exactly the opposite direction. Could you draw a diagram or something?

 
http://www.davidn.co.nr - Games, music, living in America

..:.Phox.:..



Registered
  18/02/2005
Points
  646

VIP MemberHero of TimeI like Aliens!Cardboard BoxAttention Getter
7th July, 2006 at 16:43:15 -

wait a sec.


<a href="http://imageshack.us">Image

there.

hope you understand...

 
Profile edited as it messed the layout of the site up.

Long John Kickbag



Registered
  26/08/2002
Points
  148
7th July, 2006 at 23:05:52 -

You can also use -Sin(...) and -Cos(...) instead of +Sin(...) and +Cos(...).

 
Resize! - www.clicksplat.com/comparison.html

..:.Phox.:..



Registered
  18/02/2005
Points
  646

VIP MemberHero of TimeI like Aliens!Cardboard BoxAttention Getter
8th July, 2006 at 04:49:19 -

woaH! long john is right I've tried both ways and they work exactly the same!

thanx guys, you guys rock!

 
Profile edited as it messed the layout of the site up.

tdc052621



Registered
  20/12/2002
Points
  908
8th July, 2006 at 05:05:39 -

You're welcome, its what i do

 
n/a

Airflow

imafirinmahlazr

Registered
  24/09/2003
Points
  -197

VIP MemberSonic SpeedSnow Cloud!Computer
9th July, 2006 at 03:42:31 -

ewww!

 
n/a
   

Post Reply



 



Advertisement

Worth A Click