29457Fermer29459
WarptenLe 15/11/2016 à 18:29
    TransportAnimationEntry const* node = _animationInfo->GetAnimNode(timer);
    if (node && _currentSegment != node->TimeIndex)
    {
        _currentSegment = node->TimeIndex;

        G3D::Quat rotation = _animationInfo->GetAnimRotation(timer);
        G3D::Vector3 pos = rotation.toRotationMatrix()
            * G3D::Matrix3::fromEulerAnglesZYX(GetOrientation(), 0.0f, 0.0f)
            * G3D::Vector3(node->Pos.X, node->Pos.Y, node->Pos.Z);

        pos += G3D::Vector3(GetStationaryX(), GetStationaryY(), GetStationaryZ());

        UpdatePassengerPositions(_passengers, pos);
    }