Hi there! I’m making a section in my video game without any actual plot purpose: just a fun little side area dog park.
My character and the soccer ball both have physics, and the dog has a constant movement towards the ball installed in events. This all works well and good.
But I’m unsure how to make the dog flip to the right when he chases the ball to the right! Right now he’s stuck on that particular left-facing frame.
Thank you in advance!
You would have to use the x position of the ball to flip the dog horizontally
X position of ball is > dog.X()
Flip dog horizontally = yes
X position of ball is < dog.X()
Flip dog horizontally = no
Note = the flipping depends on the original direction of the dog when added into the editor.
You might have to reposition the the point of the ball.
By default it’s placed at the top left, I would advise you position that in the middle.
Thank you so much!!! This will help a ton!