Rotate Cannon Randomly
iPhoneDevForMe
Member Posts: 362
I have an issue! I would like to have a cannon placed in the middle of the screen at the bottom. Every couple seconds, I want it to rotate to a new angle between 45 and 135.
What I have set up is:
Timer - Every 2 seconds
--Rotate to Angel Random(45,135)
--Speed 500/5000
When I preview, 2 things happen:
1. When speed is at 500, it moves about 5 degrees every 2 seconds
2. When speed is 5000, it quickly jumps, but often at an angle that is outside of 45-135
I have been using the cannon demo and another cannon demo and I just cant seem to get this to work right.
I have gotten it to work great with "When mouse is down", I just cant make it right on its own!
Any suggestions?
What I have set up is:
Timer - Every 2 seconds
--Rotate to Angel Random(45,135)
--Speed 500/5000
When I preview, 2 things happen:
1. When speed is at 500, it moves about 5 degrees every 2 seconds
2. When speed is 5000, it quickly jumps, but often at an angle that is outside of 45-135
I have been using the cannon demo and another cannon demo and I just cant seem to get this to work right.
I have gotten it to work great with "When mouse is down", I just cant make it right on its own!
Any suggestions?
Comments
I'm thinking rotate to angle is the issue for exactly what I am looking for. I will play around with a few different options and see what I can make work, if anything!
Until then, any other ideas would be great!
Use a text behavior and an replace random with an integer and just give make a rule
somewhere that your integer = random(45,135). See what it comes out to be! xD
<.<