26 lines
		
	
	
		
			789 B
		
	
	
	
		
			Python
		
	
	
	
	
	
		
		
			
		
	
	
			26 lines
		
	
	
		
			789 B
		
	
	
	
		
			Python
		
	
	
	
	
	
|  | from lnx.logicnode.lnx_nodes import * | ||
|  | 
 | ||
|  | class ApplyImpulseNode(LnxLogicTreeNode): | ||
|  |     """Applies impulse in the given rigid body.
 | ||
|  | 
 | ||
|  |     @seeNode Apply Impulse At Location | ||
|  |     @seeNode Apply Force | ||
|  |     @seeNode Apply Force At Location | ||
|  | 
 | ||
|  |     @input Impulse: the impulse vector | ||
|  |     @input On Local Axis: if `true`, interpret the impulse vector as in | ||
|  |         object space | ||
|  |     """
 | ||
|  |     bl_idname = 'LNApplyImpulseNode' | ||
|  |     bl_label = 'Apply Impulse' | ||
|  |     lnx_section = 'force' | ||
|  |     lnx_version = 1 | ||
|  | 
 | ||
|  |     def lnx_init(self, context): | ||
|  |         self.add_input('LnxNodeSocketAction', 'In') | ||
|  |         self.add_input('LnxNodeSocketObject', 'RB') | ||
|  |         self.add_input('LnxVectorSocket', 'Impulse') | ||
|  |         self.add_input('LnxBoolSocket', 'On Local Axis') | ||
|  | 
 | ||
|  |         self.add_output('LnxNodeSocketAction', 'Out') |