Implement "reflect" operation for VectorMathNode
This commit is contained in:
parent
12cdd57748
commit
2e398c96ba
|
@ -42,6 +42,8 @@ class VectorMathNode extends LogicNode {
|
|||
f = v.length();
|
||||
case "Distance":
|
||||
f = v.distanceTo(v2);
|
||||
case "Reflect":
|
||||
v.reflect(v2);
|
||||
}
|
||||
|
||||
if (from == 0) return v;
|
||||
|
|
|
@ -18,9 +18,10 @@ class VectorMathNode(Node, ArmLogicTreeNode):
|
|||
('Cross Product', 'Cross Product', 'Cross Product'),
|
||||
('Length', 'Length', 'Length'),
|
||||
('Distance', 'Distance', 'Distance'),
|
||||
('Reflect', 'Reflect', 'Reflect'),
|
||||
],
|
||||
name='', default='Add')
|
||||
|
||||
|
||||
def init(self, context):
|
||||
self.inputs.new('NodeSocketVector', 'Vector')
|
||||
self.inputs[-1].default_value = [0.5, 0.5, 0.5]
|
||||
|
|
Loading…
Reference in a new issue