Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
Converting from degrees to revolutions
Old
hotsauce15183
Guest
 
Status:
Posts: n/a
Default Converting from degrees to revolutions - 10-17-2008, 05:03 PM

I'm making a game and I want the user to be able to tell the object to turn from (-180 to 180) degrees.
Thanks if anyone can help me with this.
   
Reply With Quote
Old
Scott
Guest
 
Status:
Posts: n/a
Default 10-17-2008, 11:45 PM

isn't that a 360? which is 1 revolution?
   
Reply With Quote
Old
hotsauce15183
Guest
 
Status:
Posts: n/a
Default 10-18-2008, 09:48 AM

What I mean't to say

Ok there is a game that i'm creating with user input
The user can put in any number from (-180 to make the ball turn straight to the left or 180 to make the ball turn straight to the right and of course the other numbers in between will be the other angles 0 for straight ahead etc. After the user puts in the number the ball will move in that direction. The point of this game is to be like a putt golf simulation.
   
Reply With Quote
Old
Scott
Guest
 
Status:
Posts: n/a
Default 10-18-2008, 06:08 PM

ohhhhh. I gotcha. So when the person puts the degrees in it will convert to revolutions.

I don't know how to do that. sorry.
   
Reply With Quote
Old
hotsauce15183
Guest
 
Status:
Posts: n/a
Default 10-19-2008, 09:53 AM

yea thats it.
but thanks anyway.
   
Reply With Quote
Old
DrJim
Guest
 
Status:
Posts: n/a
Default 10-19-2008, 11:29 AM

For the basic conversion, just have the user put his number in and then divide that by 360. (180/360 = 0.5, etc.)

If you want to like - "If entry is <0 turn left else turn right."
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2021, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.