Jump to content

How to use a virtual joystick to control object?


Recommended Posts

Hi @Wingnut - I'm still alive - sort of - and busy enough to keep off the forum since my current efforts are in repetitive writing of similar functions, which is boring the heck out of me. However I haven't yet had the time to really experiment with using percentages from the conversion of canvas (X,Y) event coordinates. Although what I did attempt within the BJS master file was a incomprehensible mess thus far - as I really am not familiar enough with the VR Joystick to make any progress yet. But sometime in the near future, I do plan on trying to "steal" parts of the VR joystick and attempt to write something similar, yet independant of the existing function(s). The reason why I would take this approach, is that I've had really good luck in working with the CastorGUI extension using the latest build which now provides the option of converting (X,Y) coordinates to percentages based upon canvas size. Whereas I can and have now build an interface which draws very similar on practically any device - with the exception of my new S6 and of course VR apps - which I'm learning that GUIs for VR require a completely different approach in design and development.

So what I might try is to utilize the code within the current VR Joystick with which I'm somewhat familiar, and write this as a fuction within the CastorGUI extension - since the extension efficiently utilizes JSON objects, and I believe may have the flexability to solve some of the issues I've run into developing additional functionality within the VR joystick, by utilizing the processes in which the extension makes use of the GUI canvas and JSON objects which are the elements in the GUI. But I have SO MUCH work to complete in the next few weeks, however, as I'm curently working in the CastorGUI extension quite extensively right now, adding a flexible and adaptable VR Joystick to the extension is slowly being built in my head, as I work through similar issues using percentages to develop single interfaces adaptable to practicly any device.

As soon as I get time to attempt this (and if I find it makes sense to use the CasterGUI Ext.), I'll update this post or start a new one, as I'm certain @Dad72 would be of great help, as well as your input considering your willingness to try practically anything.:rolleyes: Of course, perhaps I'll get the time and find the good luck to use what I already belive might work - to actually work correctly. Then I'll simply post the good news. However, it's never quite that easy, is it?

Let me know if you have any VR gear, as I'm certain you would love the challenge of working in VR. I've had years of experience in developing VR, however, it's a different world working in WebGL, and I've never built user friendly VR interfaces before - which is a challenge unto itself. So I highly recommend this area of development knowing a bit about how you love to take a good challenge on.



Link to comment
Share on other sites

Very good, Dez!  Thanks for sharing that.  There's our digital VJ... on the left.  The distance between moving-ring, and stationary-ring... doesn't matter... because it's acting like rocker switches.  It's go/stop, but ignores the drag-AMOUNT.  It's another option for VJ's, eh?  The main issue.... the GUI for a standard VJ (analog) needs the delta amount.  The GUI for a digital VJ... would likely use a different GUI  (much like Dez's left joystick graphics, except without ANY rings produced by the VJ.)

Dez's left joystick GUI... doesn't really need the cyan rings from the VJ.  What it really needs is for the W button to change colors when up-drag is happening, or similar.

On mobile touch-screen devices... our thumbs would likely cover Dez's left joystick graphics, so the user would get no feedback OTHER THAN seeing the player move.  If I were me, and I am, I would consider some thin strips around the screen... and they turn colors or flash when the joystick is dragging.  This would be a way to give user feedback and not have it covered-up by a user's thumb.

A question that a guy MIGHT ask himself is... DOES the virtual joystick NEED a vjcanvas AT ALL... if no cyan/yellow rings are needed?  Does the VJ work without vjcanvas?  I guess it becomes a touch-screen drag system, then.  VJ's seem to have lots of room for expansion and variations.  It's a cool control system... seems to have a wide-open future.

@dbawel - good to see you again, and thanks for the informative post.  Good luck on the heavy workload ahead.  Tell us your stories if/when you can.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...