diff --git a/Images/Look_At.png b/Images/Look_At.png deleted file mode 100644 index 083c778..0000000 Binary files a/Images/Look_At.png and /dev/null differ diff --git a/README.md b/README.md index 42b3be0..b56dae4 100644 --- a/README.md +++ b/README.md @@ -3,23 +3,10 @@ These are Armory Nodes I've Made... # To Do ----- I want to add and fix the following ---- -
-Add: - - -Fix: - +Presently Nothing. # Images ![1 Enhanced Transform](Images/Enhanced_Transform.png) -![2 Look At](Images/Look_At.png) diff --git a/Sources/armory/logicnode/LookAtNode.hx b/Sources/armory/logicnode/LookAtNode.hx deleted file mode 100644 index e3c8f00..0000000 --- a/Sources/armory/logicnode/LookAtNode.hx +++ /dev/null @@ -1,49 +0,0 @@ -package armory.logicnode; - -import iron.object.Object; -import iron.math.Vec3; -import armory.trait.physics.RigidBody; - - -class LookAtNode extends LogicNode { - - public function new(tree:LogicTree) { - super(tree); - } - - override function run() { - var targeter:Object = inputs[1].get(); - var target:Object = inputs[2].get(); - var threeDeeTrack:Bool = inputs[3].get(); - - var targeterRot:Vec3; - var targetLoc:Vec3; - - if (targeter == null || target == null) return; - - targeterRot = new Vec3(targeter.transform.rot.x, - targeter.transform.rot.y, - targeter.transform.rot.z); - - targetLoc = new Vec3(target.transform.loc.x, - target.transform.loc.y, - target.transform.loc.z); - - var newZLook = targeterRot.z + (targeterRot.z - (targetLoc.y / targetLoc.x)); - - if ( threeDeeTrack == true ) { - targeter.transform - .setRotation(targeterRot.x, targetLoc.y, newZLook); - } else { - targeter.transform - .setRotation(targeterRot.x, targeterRot.y, newZLook); - } - - #if arm_physics - var rigidBody = targeter.getTrait(RigidBody); - if (rigidBody != null) rigidBody.syncTransform(); - #end - - super.run(); - } -} diff --git a/blender.py b/blender.py index e0a6e47..541c71f 100644 --- a/blender.py +++ b/blender.py @@ -16,24 +16,9 @@ class EnhancedTransformNode(Node, ArmLogicTreeNode): self.inputs.new('NodeSocketVector', 'Scale') self.outputs.new('ArmNodeSocketAction', 'Out') -class LookAtNode(Node, ArmLogicTreeNode): - '''LookAtNode''' - bl_idname = 'LNLookAtNode' - bl_label = 'Look At' - bl_icon = 'GAME' - - def init(self, context): - self.inputs.new('ArmNodeSocketAction', 'In') - self.inputs.new('ArmNodeSocketObject', 'Object') - self.inputs.new('ArmNodeSocketObject', 'Object') - self.inputs.new('NodeSocketBool', '3D Track') - self.outputs.new('ArmNodeSocketAction', 'Out') - - def register(): # Add custom nodes add_node(EnhancedTransformNode, category='Action') - add_node(LookAtNode, category='Action') # Register newly added nodes arm.nodes_logic.register_nodes()