635 {
636 GetTransform(transform);
637
638 vector crewPos;
639 vector crewDir;
640 CrewEntry( currentSeat, crewPos, crewDir );
641
642 vector entry[4];
643 entry[2] = crewDir;
644 entry[0] = vector.
Up * crewDir;
645 entry[1] = entry[2] * entry[0];
646 entry[3] = crewPos;
647
648 Math3D.MatrixMultiply4( transform, entry, transform );
649
650 vector position = transform[3];
651 vector orientation = Math3D.MatrixToAngles(transform);
652
653 position[1] = position[1] + maxAllowedObjHeight + (extents[1] * 0.5);
654
655 array<Object> excluded = new array<Object>;
656 array<Object> collided = new array<Object>;
657
658 excluded.Insert(this);
659
660 g_Game.IsBoxColliding(position, orientation, extents, excluded, collided);
661
663 transform[3] = position;
664
665 foreach (
Object o : collided)
666 {
669 continue;
670
671 vector minmax[2];
672 if (o.GetCollisionBox(minmax))
673 return false;
674 }
675
676 return true;
677 }
proto void CrewEntry(int posIdx, out vector pos, out vector dir)
Reads entry point and direction into vehicle on given position in model space.
bool IsIgnoredObject(Object o)
proto void RotationMatrixFromAngles(out vector mat[3])
Creates rotation matrix from angles.