Need help making an angle meter
RedHand
Peterborough, onMember Posts: 17
I need help making an angle meter that is constantly moving between 1 degree to 89 degrees, back to 1 degree and so on. It's for shot angle of ball.
Hit the meter at the wrong time, your shot will be garbage and score you no points as the ball will completely miss the target.
Any help is appreciated.
Thanks in advance
Comments
Can you desribe what this angle meter would look like, I can imagine lots of things you might describe as a meter, it's not clear what you want ?
My guess would be something like this?
http://www.windowscentral.com/sites/wpcentral.com/files/Let'sGolf2Elderly.jpg
Sorry it was clear in my head, I will describe as best as I can.
The object is to launch a ball into targets which are located at a variety of heights and distances. The power of your shot is always at 100%
The challenge of the game is you have to try and time your angle properly. I have an actor which is simply an arrow on the bottom right of the screen. I want this arrow (which will control the angle of your shot) to pivot from 1 degree to 89 degrees, once it hits it's mark of 89 degrees I want it to pivot back to 1 degree and repeat.
The arrows pivot point is on the actors left most x.
when you touch the arrow the ball will be shot from a cannon type actor at the angle set by the arrow
I hope that is clear and makes sense to you.
Thanks for your time
Maybe something like this:
@RThurman for a value between 1 and 89, you'd want to multiply by 44, correct?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
So the arrow is in the lower right hand corner, and pivots from its lefthand side, and it swings from 1° to 89° (3 o'clock to 12 o'clock) ?
If you had a 200 pixel long arrow and you we're working on an iPad landscape project, you could . .
Constrain self position X to 100 *cos(44 *sin( game.Time *100)+45)+840
Constrain self position Y to 100 *sin (44 *sin( game.Time *100)+45)+40
Constrain Rotation to 44 *sin( game.Time *100)+45
Thank you very much for the help.
I don't have a chance to do any work until Monday night. I'll give it a try then and let you know the results.
Thanks again guys.