simulation.py
def fireProjectile(self, **kwargs): # {{{0
    """Fire a projectile in the direction the camera is facing

    size: Projectile size; defaults to self.getSlider("Projectile Size")
    mass: Projectile mass; defaults to self.getSlider("Projectile Mass")
    vel: Projectile velocity (vector)
    pos: Projectile starting position (vector)

    Projectile velocity defaults at self.getSlider("Particle Speed") and in the
    direction the camera is facing.
    """
    ci = self.getCamera()
    size = kwargs.get("size", self.getSlider("Projectile Size"))
    mass = kwargs.get("mass", self.getSlider("Projectile Mass"))
    if "vel" in kwargs:
      vel = kwargs["vel"]
    else:
      vel = ci["camForward"] * self.getSlider("Particle Speed")
    pos = kwargs.get("pos", self.getCameraPos())
    logger.debug("Creating projectile m={}, p={}, r={}".format(mass, pos, size))
    s = self.createSphere(mass, pos, radius=size)
    p.resetBaseVelocity(s, linearVelocity=vel)
    self._bodies.add(s)
    return s
Fire a projectile in the direction the camera is facing

    size: Projectile size; defaults to self.getSlider("Projectile Size")
    mass: Projectile mass; defaults to self.getSlider("Projectile Mass")
    vel: Projectile velocity (vector)
    pos: Projectile starting position (vector)

    Projectile velocity defaults at self.getSlider("Particle Speed") and in the
    direction the camera is facing.
    
Fire a projectile in the direction the camera is facing
size: Projectile size; defaults to self.getSlider("Projectile Size")
mass: Projectile mass; defaults to self.getSlider("Projectile Mass")
vel: Projectile velocity (vector)
pos: Projectile starting position (vector)

Projectile velocity defaults at self.getSlider("Particle Speed") and in the
direction the camera is facing.
Fire a projectile in the direction the camera is facing size : Projectile size ; defaults to self . getSlider ( " Projectile Size " ) mass : Projectile mass ; defaults to self . getSlider ( " Projectile Mass " ) vel : Projectile velocity ( vector ) pos : Projectile starting position ( vector ) Projectile velocity defaults at self . getSlider ( " Particle Speed " ) and in the direction the camera is facing .
def fireProjectile(self, **kwargs): 
    ci = self.getCamera()
    size = kwargs.get("size", self.getSlider("Projectile Size"))
    mass = kwargs.get("mass", self.getSlider("Projectile Mass"))
    if "vel" in kwargs:
      vel = kwargs["vel"]
    else:
      vel = ci["camForward"] * self.getSlider("Particle Speed")
    pos = kwargs.get("pos", self.getCameraPos())
    logger.debug("Creating projectile m={}, p={}, r={}".format(mass, pos, size))
    s = self.createSphere(mass, pos, radius=size)
    p.resetBaseVelocity(s, linearVelocity=vel)
    self._bodies.add(s)
    return s
def fireProjectile ( self , ** kwargs ) : ci = self . getCamera ( ) size = kwargs . get ( "size" , self . getSlider ( "Projectile Size" ) ) mass = kwargs . get ( "mass" , self . getSlider ( "Projectile Mass" ) ) if "vel" in kwargs : vel = kwargs [ "vel" ] else : vel = ci [ "camForward" ] * self . getSlider ( "Particle Speed" ) pos = kwargs . get ( "pos" , self . getCameraPos ( ) ) logger . debug ( "Creating projectile m={}, p={}, r={}" . format ( mass , pos , size ) ) s = self . createSphere ( mass , pos , radius = size ) p . resetBaseVelocity ( s , linearVelocity = vel ) self . _bodies . add ( s ) return s
Fire a projectile in the direction the camera is facing
size: Projectile size; defaults to self.getSlider("Projectile Size")
mass: Projectile mass; defaults to self.getSlider("Projectile Mass")
vel: Projectile velocity (vector)
pos: Projectile starting position (vector)
Fire a projectile in the direction the camera is facing size : Projectile size ; defaults to self . getSlider ( " Projectile Size " ) mass : Projectile mass ; defaults to self . getSlider ( " Projectile Mass " ) vel : Projectile velocity ( vector ) pos : Projectile starting position ( vector )
# {{{0 """Fire a projectile in the direction the camera is facing

    size: Projectile size; defaults to self.getSlider("Projectile Size")
    mass: Projectile mass; defaults to self.getSlider("Projectile Mass")
    vel: Projectile velocity (vector)
    pos: Projectile starting position (vector)

    Projectile velocity defaults at self.getSlider("Particle Speed") and in the
    direction the camera is facing.
    """
self