18 lines
		
	
	
		
			701 B
		
	
	
	
		
			Python
		
	
	
	
	
	
		
		
			
		
	
	
			18 lines
		
	
	
		
			701 B
		
	
	
	
		
			Python
		
	
	
	
	
	
|  | from lnx.logicnode.lnx_nodes import * | ||
|  | 
 | ||
|  | class SetVelocityNode(LnxLogicTreeNode): | ||
|  |     """Sets the velocity of the given rigid body.""" | ||
|  |     bl_idname = 'LNSetVelocityNode' | ||
|  |     bl_label = 'Set RB Velocity' | ||
|  |     lnx_version = 1 | ||
|  | 
 | ||
|  |     def lnx_init(self, context): | ||
|  |         self.add_input('LnxNodeSocketAction', 'In') | ||
|  |         self.add_input('LnxNodeSocketObject', 'RB') | ||
|  |         self.add_input('LnxVectorSocket', 'Linear') | ||
|  |         self.add_input('LnxVectorSocket', 'Linear Factor', default_value=[1.0, 1.0, 1.0]) | ||
|  |         self.add_input('LnxVectorSocket', 'Angular') | ||
|  |         self.add_input('LnxVectorSocket', 'Angular Factor', default_value=[1.0, 1.0, 1.0]) | ||
|  | 
 | ||
|  |         self.add_output('LnxNodeSocketAction', 'Out') |