This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
functions:length3d [2017/03/15 21:33] – korshun | functions:length3d [2019/07/06 17:02] (current) – removed monsterovich | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== length3d ====== | ||
- | {{tag> | ||
- | '' | ||
- | |||
- | ===== Description ===== | ||
- | Returns the length of the given 3D vector. | ||
- | |||
- | ===== Example ===== | ||
- | Show 3D distance between actors: | ||
- | < | ||
- | int x = GetActorX(tid2) - GetActorX(tid1); | ||
- | int y = GetActorY(tid2) - GetActorY(tid1); | ||
- | int z = GetActorZ(tid2) - GetActorZ(tid1); | ||
- | int distance = length3d(x, y, z), | ||
- | print(s:" | ||
- | </ | ||
- | |||
- | <note tip>Use [[ActorDistance]] instead of the example code above.</ | ||
- | |||
- | ===== See also ===== | ||
- | * [[length2d]] | ||
- | |||