Help with mouse navigation not keyboard


#1

Hi, I can only use the logic node, I am making VR tour and would like to zoom with scroll, rotate with left mouse click-drag and pan with right mouse click-drag, please show me how to setup such behavior in node, thank you.


#2

Hi @Philip_Knobody_Fong,

Added some basic example for translation, rotation and scaling [here] (https://github.com/armory3d/armory_examples/tree/master/logic_basics) (using keyboard).

Camera panning example using mouse available here. Camera zooming example coming later tonight or tomorrow.

BR
guzzard


#3

Wow, thank you very much!!

I am using a shader based game engin Coppercube and will mix in with Armory scene when complete:
https://s3-ap-southeast-1.amazonaws.com/1campaign/publication/example-ad.html


#4

@Philip_Knobody_Fong :+1: that kind of scene should be possible to build in Armory, no problem.

Camera mouse zoom example available here now. Please note it will only work if you update Armory to git version using the built-in SDK updater because a new node had to be added to get it working smoothly.


#5

Hi @guzzard
Did the git update of the sdk from within blender, console says it is up to date.
Though the zoom example shows these “undefined” nodes.


#6

Try this,

1)Restore stable
2)Close and restart Armory
3)Update to latest git
4)Close and restart Armory


#7

Blender needs to be restarted after running the SDK update. In case python files are added/updated a restart is needed, Blender reads them during startup.


#8

Did you install git first then sdk update?


#9

Hi Guzzard,
I managed to rotate the camera placed under two objects, combine mouse down and keyboard, this is as far as I can go, the middle mouse don’t seems to work at all.

But material does not render in the preview also light and environment won’t publish in HTML, any idea what I missed?

https://drive.google.com/open?id=1RayUHqp4P4U0ieD-WQWcp59fiqvO8b9m


#10

Hi @Philip_Knobody_Fong.

Here are the changes I did:

  • Use ArcBall script for camera rotation since this script is already available and built in. See setup with CameraArm + Camera objects.
  • Put zoom logic node tree on camera
  • Adjusted materials: removed connection to UV node on plane, enabled shadows for ball material
  • Adjusted sun lamp strength
  • Adjusted sky texture strength

To move the camera around hold down left mouse button. To zoom hold down middle mouse button.

File: https://drive.google.com/open?id=1ByE8SV_2oim-9ivZhC2ugoCywizi-oDu


#11

Thank you so much for your help, here are the issues:

  • Chrome local browser does not display but online does.
  • Firefox does not show sun light, only global.

Here is the build: http://www.1catalogue.com/build_untitled/html5/index.html


#12

Already had git installed and it picked it up, saw it going through console. It was the restart that was needed as guzzard said. Material was displaying properly but Firefox was just showing global.


#13

It was the restart. Working great. Thanks.
You should do some video tut about this stuff.


#14

Thanks Tumira. It was the restart that was needed. Already had git.


#15

@Philip_Knobody_Fong, you’re welcome. Chrome issues are most likely due to security settings see here. Created an issue on github for the Firefox lamp issue.


#16

Sigh… too bad, mobile cannot view at all. Hope it can deliver cross platform and device soon, 3D web or VR is blooming, I plan to teach the advertising agencies to adopt the technology, other Blender addons are a bit pricey or under development, been planing for years so I can’t wait, I’ll begin with the simplest game engine.

Thanks for the help and hope to see Armory as open source game changer!


#17

@lubos fixed the Firefox issue now in commit 34fd94a. If you update the Armory SDK, clean, and rebuild the project it should look fine in Firefox now as well.


#18

I think it is broken, the build is empty, Blender hang when play in preview.


#19

Updated SDK, started from a clean project out of the github downloaded .zip, played. Got this on FF:

EDIT 1: Sorry not at you @guzzard, wrong reply to.


#20

@Philip_Knobody_Fong, @Xico, not sure why it doesn’t work properly for you guys :confused:. For me it works fine. I even tested in Windows and it works fine there as well in both Chrome and Firefox.