How To Make An Actor Follow Your Touch?
FallingBoxStudios
Freelance Graphic DesignerMember Posts: 822
Hi, I mean like a ping pong paddle, where if you grab it, you can control it by moving it left or right,
Thanks, - Hunter
Thanks, - Hunter
Comments
When touch is pressed constrain the paddles X and Y location to your touch location.
"touch location" is in the expression editor, Devices » Mouse » Position » X and Y.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
If you want it to wrap around the screen maybe you need a different play mechanic? Since it's constrained to touch, you'd need to drag it back to the other side...
Doodle Jump uses the accelerometer, not touch so it's a different play mechanic.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
But I also tried to set up walls, by creating a "Collide With Actor - Walls" but the paddle actor went right through the walls .
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
mainly the part where he teaches you how to make the paddle have a limit of how far the paddle could go out of the screen, but the resolution is far too low, I can't read what he's typing into the expression editor can someone please help :-S
Constrain Attribute: self.Position.X To: min(max(game.Mouse Position.X,30),290)