How do you measure distance?

pjnolenpjnolen Member Posts: 152
edited November -1 in Working with GS (Mac)
For a basic example, if an object moves from one marked location to another, how would measure and display that distance?

Comments

  • pjnolenpjnolen Member Posts: 152
    the cannon template is a good example. If you removed all the walls and such where the ball lands, is there a way to measure how far the cannonball was fired from the cannon to the point where it would hit the ground?
  • PhoticsPhotics Member Posts: 4,172
    You might be interest in The Unofficial GameSalad Textbook, as it has a great math section. It explains how the Pythagorean Theorem applies to GameSalad and how the Magnitude function can be used to calculate distance between two actors / locations.

    Basically, the game is on a grid. So... if you know the X & Y locations of both points, you can use A²+B²=C² to figure out the distance. Magnitude makes this easier.
Sign In or Register to comment.