def METHOD_NAME(self):
    """ Right Mouse Button """
    own = self.object.worldPosition
    end = self.object.worldPosition + self.object.worldOrientation @ Vector([10,0,0])
    ray = self.object.rayCast(end,own,1000)
    if ray[0]:
        hit = ray[1]
        bge.render.drawLine(own, hit, (1,0,0))
    else:
        bge.render.drawLine(own, end, (0,1,0))
    bge.logic.getCurrentScene().resetTaaSamples = True