def get_motion_vector(self):
        sx, sz = self.get_strafe()
        if sx == 0 and sz == 0:
            return (0, 0, 0)
        strafe = atan2(sz, sx)
        m = cos(self.ry)
        y = sin(self.ry)
        if sx:
            if not sz:
                y = 0
            m = 1
        if sz > 0:
            y = -y
        vx = cos(self.rx + strafe) * m
        vy = y
        vz = sin(self.rx + strafe) * m
        return normalize((vx, vy, vz))
dataset/ETHPy150Open fogleman/pg/pg/wasd.py/WASD.get_motion_vector/original