Author Topic: How does the polyhedron attribute work?  (Read 907 times)

When making a new trigger object, I have to define a polyhedron. I have no idea what any of these numbers mean. I think the first three numbers in per 4 numbers is probably x y and z cords but then what would the fourth value be?

Code: [Select]
polyhedron = "0 0 0 1 0 0 0 -1 0 0 0 1"; // This determines the shape of the trigger.

Any clarification on this would be appreciated.

Code: [Select]
polyhedron = "0 0 0 1 0 0 0 -1 0 0 0 1"; // This determines the shape of the trigger.
"X1 Y1 Z1 X2 Y2 Z2 X3 Y3 Z3 X4 Y4 Z4"



The first point is an offset from the position of the trigger, the last 3 points are 3 orthogonal vectors to make a box from that point.

For example, this polyhedron will make the trigger centered on it's position:
"-0.5 -0.5 -0.5 1 0 0 0 1 0 0 0 1"



The first point is an offset from the position of the trigger, the last 3 points are 3 orthogonal vectors to make a box from that point.

For example, this polyhedron will make the trigger centered on it's position:
"-0.5 -0.5 -0.5 1 0 0 0 1 0 0 0 1"
Thanks, that's the best description.

Thank you.  I've been wondering about that.