Forum

NodeEditor object rotation to mouse position/Drag and Rotate

23 January 2018 17:31
Hi!

How can I rotate an object along an axis, by dragging the mouse using the logic nodes?
So far what I got is to rotate the object X degrees in Y time, but on click only.
Is this at all possible to do this with nodes, and use mouse drag?


Second question on the side, is it possible to attach scripts to objects like in the Three.JS web editor or Unity style?

Thanks for any help! :)
15 February 2018 18:43
No, you can't. Mouse drag is not supported in Logic nodes.

You can't attach scripts to the object, but you can create a function with "Define Function" node and then pass an object as a parameter in "Call Function" node.
Alexander (Blend4Web Team)
twitter
 
Please register or log in to leave a reply.