I did include them. However, they look like this: Constrain self.position.x to 80*cos( self.targetAngle )+ game.BlockX and the other on is just sin and blockY.
So how the target angle turned out this time must be influencing it. Does that make sense? I swear I didn't do anything to change BlockX or BlockY.
Also, I have two areas of the screen that need to be touched at the same time. The "touchable" area for the paddle, and another part that changes the color of the paddle. Ho could i do this when sometimes one of them will be activated with the first touch, and sometimes the second?
Good luck with the logic of touch areas! You will probably need a couple of boolean attributes to keep track of what got touched first (and then use touch1 and touch2 accordingly). Its all doable, but requires a bit of logic to keep track of things.
How do you think i should approach my other problem --- the multi-touch one? Also, I tried doing what i said above, by changing to a positive, but it made it jerky and messed up. Is there some other characteristic I need to add?
Actor still does that weird thing on the touch version. I'm starting to think it's some other actor causing it. I'll check it out tomorrow. Testing Accel. now.
Also, do you have to reload the page every time to submit a new comment or is that just me?
If anyone has any ideas on the problems I stated above, PLEASE let me know. I have to publish this tonight and this is really the last things it needs.
Comments
Constrain self.position.x to 80*cos( self.targetAngle )+ game.BlockX
and the other on is just sin and blockY.
So how the target angle turned out this time must be influencing it. Does that make sense? I swear I didn't do anything to change BlockX or BlockY.
-Thomas
If you tilt it to the right, it goes to the left and vise versa.
I'm going to try changing the minus sign after the first self.position.x to a plus sign and see if that helps.
thanks,
-Thomas
It its on its side, then the hardware does not change orientation, you need to use the y accelerometer as if it is the x accelerometer.
How do you think i should approach my other problem --- the multi-touch one?
Also, I tried doing what i said above, by changing to a positive, but it made it jerky and messed up. Is there some other characteristic I need to add?
Good Night --- Thanks again for all your help.
Let me know if you think of a solution to the opposite problem i was having.
when the mouse is down
---- Constrain Attribute: self.Rotation To: self.Rotation +((vectorToAngle( game.Touches.Touch 1.X - self.Position.X , game.Touches.Touch 1.Y - self.Position.Y )- self.Rotation )*.06)
otherwise
---- Constrain Attribute: self.Rotation To: min(180,max(0, self.Rotation +(((vectorToAngle( game.Accelerometer.X , game.Accelerometer.Y )-90)%360)- self.Rotation )*.1))
Also, do you have to reload the page every time to submit a new comment or is that just me?
Just wondering. Back to work on the project now. I'll let you know what I find out.
-Thomas
1) Backwards accelerometer on Catch and Block
2) Touch and Accelerometer not working on Bounce
Catch is the flat level, block is the arc one, and bounce is the rotating one. May as well call them by their names.
Any ideas on any of this stuff? Also, the touch is not backwards in block and catch, in case that matters.
-Thomas
If anyone has any ideas on the problems I stated above, PLEASE let me know. I have to publish this tonight and this is really the last things it needs.
Thank you so much,
-Thomas
-Thomas
RThurman
I sent you a PM with a link to an example file. It should be pretty close to what you are looking for.
RThurman