peng3d/actor/__init__.py
def move(self,dist):
        """
        Moves the actor using standard trigonometry along the current rotational vector.
        
        :param float dist: Distance to move
        
        .. todo::
           
           Test this method, also with negative distances
        """
        x, y = self._rot
        y_angle = math.radians(y)
        x_angle = math.radians(x)
        m = math.cos(y_angle)
        dy = math.sin(y_angle)
        dy = 0.0
        dx = math.cos(x_angle)
        dz = math.sin(x_angle)
        dx,dy,dz = dx*dist,dy*dist,dz*dist
        x,y,z = self._pos
        self.pos = x+dx,y+dy,z+dz
        return dx,dy,dz
def move(self,dist):
        """
        Moves the actor using standard trigonometry along the current rotational vector.
        
        :param float dist: Distance to move
        
        .. todo::
           
           Test this method, also with negative distances
        """
        x, y = self._rot
        y_angle = math.radians(y)
        x_angle = math.radians(x)
        m = math.cos(y_angle)
        dy = math.sin(y_angle)
        dy = 0.0
        dx = math.cos(x_angle)
        dz = math.sin(x_angle)
        dx,dy,dz = dx*dist,dy*dist,dz*dist
        x,y,z = self._pos
        self.pos = x+dx,y+dy,z+dz
        return dx,dy,dz
def move ( self , dist ) : x , y = self . _rot y_angle = math . radians ( y ) x_angle = math . radians ( x ) m = math . cos ( y_angle ) dy = math . sin ( y_angle ) dy = 0.0 dx = math . cos ( x_angle ) dz = math . sin ( x_angle ) dx , dy , dz = dx * dist , dy * dist , dz * dist x , y , z = self . _pos self . pos = x + dx , y + dy , z + dz return dx , dy , dz
Moves the actor using standard trigonometry along the current rotational vector.
        
        :param float dist: Distance to move
        
        .. todo::
           
           Test this method, also with negative distances
Moves the actor using standard trigonometry along the current rotational vector . : param float dist : Distance to move .. todo :: Test this method also with negative distances