This commit is contained in:
knowledgenude 2020-11-02 12:55:11 -03:00
parent 7fcd3dc81d
commit 4d87a0d3ad
8 changed files with 11 additions and 11 deletions

View file

@ -15,9 +15,9 @@ class ApplyForceAtLocationNode extends LogicNode {
override function run(from: Int) {
var object: Object = inputs[1].get();
var force: Vec4 = inputs[2].get();
var localForce: Bool = inputs.length > 2 ? inputs[3].get() : false;
var localForce: Bool = inputs.length > 3 ? inputs[3].get() : false;
var location: Vec4 = inputs[4].get();
var localLoc: Bool = inputs.length > 4 ? inputs[5].get() : false;
var localLoc: Bool = inputs.length > 5 ? inputs[5].get() : false;
if (object == null || force == null || location == null) return;

View file

@ -15,7 +15,7 @@ class ApplyForceNode extends LogicNode {
override function run(from: Int) {
var object: Object = inputs[1].get();
var force: Vec4 = inputs[2].get();
var local: Bool = inputs.length > 2 ? inputs[3].get() : false;
var local: Bool = inputs.length > 3 ? inputs[3].get() : false;
if (object == null || force == null) return;

View file

@ -15,9 +15,9 @@ class ApplyImpulseAtLocationNode extends LogicNode {
override function run(from: Int) {
var object: Object = inputs[1].get();
var impulse: Vec4 = inputs[2].get();
var localImpulse: Bool = inputs.length > 2 ? inputs[3].get() : false;
var localImpulse: Bool = inputs.length > 3 ? inputs[3].get() : false;
var location: Vec4 = inputs[4].get();
var localLoc: Bool = inputs.length > 4 ? inputs[5].get() : false;
var localLoc: Bool = inputs.length > 5 ? inputs[5].get() : false;
if (object == null || impulse == null || location == null) return;

View file

@ -15,7 +15,7 @@ class ApplyImpulseNode extends LogicNode {
override function run(from: Int) {
var object: Object = inputs[1].get();
var impulse: Vec4 = inputs[2].get();
var local: Bool = inputs.length > 2 ? inputs[3].get() : false;
var local: Bool = inputs.length > 3 ? inputs[3].get() : false;
if (object == null || impulse == null) return;

View file

@ -15,7 +15,7 @@ class ApplyTorqueImpulseNode extends LogicNode {
override function run(from: Int) {
var object: Object = inputs[1].get();
var torque: Vec4 = inputs[2].get();
var local: Bool = inputs.length > 2 ? inputs[3].get() : false;
var local: Bool = inputs.length > 3 ? inputs[3].get() : false;
if (object == null || torque == null) return;

View file

@ -15,7 +15,7 @@ class ApplyTorqueNode extends LogicNode {
override function run(from: Int) {
var object: Object = inputs[1].get();
var torque: Vec4 = inputs[2].get();
var local: Bool = inputs.length > 2 ? inputs[3].get() : false;
var local: Bool = inputs.length > 3 ? inputs[3].get() : false;
if (object == null || torque == null) return;

View file

@ -13,8 +13,8 @@ class GetVelocityNode extends LogicNode {
override function get(from: Int): Dynamic {
var object: Object = inputs[0].get();
var localLinear: Bool = inputs.length > 0 ? inputs[1].get() : false;
var localAngular: Bool = inputs.length > 1 ? inputs[2].get() : false;
var localLinear: Bool = inputs.length > 1 ? inputs[1].get() : false;
var localAngular: Bool = inputs.length > 2 ? inputs[2].get() : false;
if (object == null) return null;

View file

@ -15,7 +15,7 @@ class TranslateObjectNode extends LogicNode {
override function run(from: Int) {
var object: Object = inputs[1].get();
var vec: Vec4 = inputs[2].get();
var local: Bool = inputs.length > 2 ? inputs[3].get() : false;
var local: Bool = inputs.length > 3 ? inputs[3].get() : false;
if (object == null || vec == null) return;