Actor going going back and forth between two objects
csmyersa
Member, PRO Posts: 11
Hello
I am trying to have an actor going left and right between two walls. It's an obstacle so it should keep going left and right.
Once the actor touches the right wall it goes left and when it touches the left wall it goes right.
Any ideas?
Thanks
Comments
@csmyersa hope it helps
My Gamesalad Games On App Store:
Greedy Chubby: https://itunes.apple.com/us/app/greedy-chubby/id834371213?ls=1
maybe a rule that says when the actor collides with the wall, change linear velocity x to linear velocity x *-1. just make sure that the walls are different boundary actors to floors and platforms if you use them.
This tutorial might help:
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page