Armory3D thinks I have a gamepad connected but I don’t. Im running on Mac mini 2018 with a wireless mouse and Magic Keyboard.
Here is my code.
private function onInit()
{
mouse = Input.getMouse();
gamepad = Input.getGamepad(0);
}
private function onUpdate()
{
trace(gamepad.connected);
//Set Rotation from Mouse
//if (!gamepad.connected)
{
var mx = -(App.w() / 2 - mouse.x) / App.w();
var my = (App.h() / 2 - mouse.y) / App.h();
var mv = new Vec4(mx, my,0).normalize();
this.object.transform.rot.fromTo(Vec4.yAxis(),mv);
}
//Build Transform Matrix
this.object.transform.buildMatrix();
}