Help with touching detection.
mmmodel
Member Posts: 46
Hi guys. I need help with my pong game... The problem is that when i try to play in my device the touching looks really bad, i can't move the actor when i need... looks that the actor have some delay or the touching sensitive is bad too but i did one rule for the touching and another for the serving.. The touching rule i used have the game.Mouse.Position.Y > 60 and < 260 and one constrain att self.position.y to game.mouse.position.y and the serving i think is working good... Please, anyone help me. Thanks.
Comments
When Touch is Pressed
.....Constrain Attribute self.position.Y to max(60,min(260,game.mouse.Position.Y))
How large is your paddle actor? If it's skinny, the touch sensitivity may not work so well. You can increase the width or you can mask it by including extra transparent space on the artboard around the paddle when you export it from a drawing program.
Are you making sure to only contact the screen in one place with one finger? If that's a problem, you should change the game.mouse.Position.Y to game.Touches.Touch 1.Y.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User