Avoiding Objects
villewanted
Member, PRO Posts: 66
I want an actor to follow another but the second actor collides with walls so I want to know how to make an actor avoid objects like walls.
Comments
Think about how you would avoid a wall in real life. You might use your eyes to see it from afar, or your hands to touch is from nearby. One idea is to constrain an actor in front of the other actor and have a collide rule on the front actor that changes a boolean so that the trailing actor knows about the collision. Another is to use magnitude to figure out how far you are from a wall... that approach is probably more complex because of needing to know which wall you are near.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User