Measure the distance covered by an actor. Is there a simple way?

MarkOnTheIronMarkOnTheIron Member Posts: 1,447
edited November -1 in Working with GS (Mac)
Hi everybody,

I was wandering if there was a way to measure the distance covered by an actor.

Magnitude can't help because the actor doesn't move in a straight line.
Time/Velocity can't help because the actor doesn't move in a fixed velocity.

Is there any other way?

Comments

  • MotherHooseMotherHoose Member Posts: 2,456
    attributes to store startX and endX...
    and since it is not a straight line ... attributes to store startY and endY...

    basically interpret the differences of those attributes as two sides of a triangle:

    the difference in the Xs will give you the base of a triangle;
    and the difference in the Ys the vertical side...
    the other side...the hypotenuse... is the distance traveled.

    find the the sum of squares of those 2 sides ... ((x*x)+(y*y)) and then function sqrt of that sum. that will give you the distance...

    and, even I know there has to be a better way!... but I don't do the math!

    MH

    EDIT: thinking again, just get the magnitudes of X and of Y and square each and sum them and then sqrt will = distance.

    and, if you are moving with curves... you may have to just do a pixel count...
  • MarkOnTheIronMarkOnTheIron Member Posts: 1,447
    A pixel count would be perfect since the actor moves in irregular curves. But I can't see a way to do it in GS, or I'm simply missing it
Sign In or Register to comment.