Is there a way to constrain an actor to a specific grid?
Hi there, I have been struggling with this for a while. I have an actor who is dragged by touch. I want it to go anywhere on the screen but be restricted to specific points.
This is a maze that doesn't only go up-down-left-right (hence, Min Max wont' do it), but also diagonal in no specific angle.
I can create a list of coordinates (ex: X=104 y=211) and put it in a table but how do I tell Gamesalad that the actor is restricted only to these pairs of coordinates and cannot stray from them?
Any idea/thought is welcomed!!!!
This is a maze that doesn't only go up-down-left-right (hence, Min Max wont' do it), but also diagonal in no specific angle.
I can create a list of coordinates (ex: X=104 y=211) and put it in a table but how do I tell Gamesalad that the actor is restricted only to these pairs of coordinates and cannot stray from them?
Any idea/thought is welcomed!!!!
Best Answer
-
tatiang Posts: 11,949
I'm not sure about that one. You'll probably need to create the walls and use @tshirtbooth's demo here: http://gshelper.com/constrain-to-mouse-and-keep-collision-gamesalad.New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Answers
If you're looking to snap to a point, what about having an invisible actor centered at each point and then having a rule on the draggable actor that snaps to that point when colliding with the invisible actor?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
I have done the invisible Snap Actor and placed them along the path, but if you drag the actor it lets you get off the path and then it is just stuck... Changed both actors' physics to not allow them to be so "light" but that did not help either.