Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

3Dconnexion SpaceNavigator support!

Discussion in 'Wish List' started by Jessy, Jul 16, 2007.

  1. ratamorph

    ratamorph

    Joined:
    Sep 2, 2007
    Posts:
    458
    Important for most people that posted in this topic but clearly not as important to the real decision makers, they got other things on their table that to their judgement are more important.

    That's the reason why Unity allows developers to add support to the editor as they need, but sadly doesn't give us control over the things we'd need to make Space Navigator support ourselves.
     
  2. StereoMike

    StereoMike

    Joined:
    Mar 5, 2009
    Posts:
    29
    +1 for Space mouse support!
     
  3. Jonas B

    Jonas B

    Joined:
    Jan 13, 2009
    Posts:
    118
    If the hooks into the new Unity Editor are as extensive as they sound in the description, it shouldn't be hard to implement this yourself. I've used 3DConnexions' .NET driver wrapper for navigation in my own applications, very straightforward.
    GlovePIE might be another alternative, depending on what the input API looks like.
     
  4. Deleted User

    Deleted User

    Guest

  5. ratamorph

    ratamorph

    Joined:
    Sep 2, 2007
    Posts:
    458
    I asked Nicholas about coding support for the space navigator or other devices like it and apparently its not very possible to do it ourselves at the moment, it also doesn't seem to be in the works at least not for 2.6.

    http://forum.unity3d.com/viewtopic.php?t=21618

    Maybe I didn't understood what he meant by
    I've looked everywhere and tried many things and I can't seem to find a way to move or rotate the scene view camera through scripting, and without this there doesn't seem to be a way to even start developing such support.

    If anyone knows a way to do this, PM me or post it here, then we might be able to do it ourselves, if I find a way to do this I'll post it in the wiki for sure.
     
  6. Wyldfire

    Wyldfire

    Joined:
    Apr 5, 2006
    Posts:
    51
  7. Yann

    Yann

    Joined:
    Oct 20, 2007
    Posts:
    432
    Waiting for more editor APIS (a scriptable camera object, pleaaaaase...) I'm using the SpaceNavigator as a joystick in Unity...

    But thanks to the FPS editor mode of Unity 2.5, you can already obtain beautiful and really helpful results. As an example, here's a ControllerMate bundle I made yesterday in a few minutes. It has already changed the way I navigate inside my Unity scenes : now I can really fly anywhere with the camera, without having to touch the keyboard :

    www.tiviboo.com/unity/SpaceNavUnityFlyingCam.zip

    Details :

    - It only manages the 8 horizontal directions, but during the "flight" you just have to move your mouse (no need to press the 2nd mouse button, which is good on laptops) to pan your scene camera in any direction.

    - When not moving, you can still rotate the camera by gently touching the SpaceNavigator's top and moving the mouse (or with a right mouseclick, of course)
    Be careful : this emulates a right-click, so use with precaution if your pointer is outside the scene view... if you find it too risky, you can disable the "Y-Axis" module in ControllerMate, or make it less reactive by enlarging the calibration values - or just toggle the SpaceNavigator on/off with its right button when you're not navigating.

    - Left button is assigned to Unity's "F" key

    - Right button toggles the SpaceNavigator on/off, as said

    - If you perform a left mouse click during a "flight", the FPS will switch to fast mode, without pan. It will switch back to "normal" mode if you stop and move again.

    Of course it's far from replacing a real implementation (pleaaaaaaaaaaase...) but at least it works pretty well and doesn't make your SpaceNavigator unuseable (or hardly useable) in Unity.

    And of course you don't need a SpaceNavigator to use this bundle (just change the controllers in ControllerMate to any input device : joystick, or whatever) but people who already have one might find this interesting.

    The ZIP file also contains a 3DConnexion settings file for Unity, to ensure you get the right camera behaviour. Just Import it from the 3DConnexion panel, after backing up your own Unity settings if you have some.
     
  8. Yann

    Yann

    Joined:
    Oct 20, 2007
    Posts:
    432
    Forgot to include the "Unity is frontmost app" test in first version... the link is now updated.
     
  9. Kerome

    Kerome

    Joined:
    Jan 3, 2009
    Posts:
    2
    And another vote for native SpaceNavigator support... this looks like something that'd be a big win in ease-of-use for people who spend a lot of time in the editor (which i guess is most people here). I'd love to give this a try.
     
  10. Wyldfire

    Wyldfire

    Joined:
    Apr 5, 2006
    Posts:
    51
    Don't vote here! Do it at http://feedback.unity3d.com where it can be counted! :wink:
     
  11. andre-ivankio

    andre-ivankio

    Joined:
    Mar 29, 2010
    Posts:
    53
    Any Windows alternative was already implemented in the community?
     
  12. andre-ivankio

    andre-ivankio

    Joined:
    Mar 29, 2010
    Posts:
    53
    I tried to grossly implement space navigator at least in the runtime camera. It works, but I need help with the absolute values on axis input.

    Because of the absolute axis, I had to do that oldVector dirty trick. One problem is that it would be much dirtier to implement the filtering off of small inputs.

    Another problem is that it will stop working whenever I go beyond 1 or -1 on any axis, that's why I needed to set sensitivity so low. But we still can reach that cap as it is now.

    I believe I'm overlooking some basic Unity functionalities, am I?

    Code (csharp):
    1. // INPUTS:
    2. //
    3. // joyX = X axis
    4. // joyY = 3rd axis * invert
    5. // joyZ = Y axis * invert
    6. // tilt = 6th axis
    7. // pan = 4th axis * invert
    8. // roll = 5th axis
    9. //
    10. // all sensitivity set to 0,001
    11.  
    12. var translateSpeed = 100.0;
    13. var rotateSpeed = 100.0;
    14.  
    15. private var joyTrans = Vector3(0,0,0);
    16. private var joyRotate = Vector3(0,0,0);
    17.  
    18. private var joyOldTrans = Vector3(0,0,0);
    19. private var joyOldRotate = Vector3(0,0,0);
    20.  
    21. private var texto = "monitor";
    22.  
    23. //@script AddComponentMenu("Camera-Control")
    24.  
    25. function OnGUI () {
    26.     texto = joyTrans.ToString();
    27.     GUI.Box (Rect (10,10,200,20), texto);
    28.     texto = joyRotate.ToString();
    29.     GUI.Box (Rect (10,30,200,20), texto);
    30.     }
    31.  
    32. function Start () {
    33.     joyTrans.x = Input.GetAxis("joyX");
    34.     joyTrans.y = Input.GetAxis("joyY");
    35.     joyTrans.z = Input.GetAxis("joyZ");
    36.     joyOldTrans = joyTrans;
    37.    
    38.     joyRotate.x = Input.GetAxis("pan");
    39.     joyRotate.y = Input.GetAxis("tilt");
    40.     joyRotate.z = Input.GetAxis("roll");
    41.     joyOldRotate = joyRotate;
    42. }
    43.  
    44. function LateUpdate () {
    45.  
    46.         joyOldTrans = joyTrans;
    47.         joyTrans.x = Input.GetAxis("joyX");
    48.         joyTrans.y = Input.GetAxis("joyY");
    49.         joyTrans.z = Input.GetAxis("joyZ");
    50.        
    51.         joyOldRotate = joyRotate;
    52.         joyRotate.x = Input.GetAxis("pan");
    53.         joyRotate.y = Input.GetAxis("tilt");
    54.         joyRotate.z = Input.GetAxis("roll");
    55.        
    56.         var position = (joyTrans-joyOldTrans) ;
    57.         var rotation = (joyRotate-joyOldRotate);
    58.         position *= 1*translateSpeed;
    59.         rotation *= 36*rotateSpeed;
    60.        
    61.         transform.Translate (position);
    62.         transform.Rotate (rotation);
    63. }
     
  13. Pulov

    Pulov

    Joined:
    Feb 20, 2010
    Posts:
    824
    I used one of these in my previous job. They're prety nice.

    The latest version of Microstation has now native support for them. Hope unity takes a look on these.
     
  14. Yann

    Yann

    Joined:
    Oct 20, 2007
    Posts:
    432
    Just give us a scriptable editor camera and we'll do the rest... on the Mac for example, there is a SpaceNavigator implementation in Quartz Composer, which is free for everyone and trivial to manage. With a small network connection, one could develop a SpaceNavigator external "pilot" for Unity in a few minutes, without even needing to make use of the 3DConnexion SDK...
     
  15. imin

    imin

    Joined:
    Feb 24, 2010
    Posts:
    29
  16. Srch

    Srch

    Joined:
    May 28, 2010
    Posts:
    8
    Should have posted here, only saw this thread after:

    From the unity Feedback page:
     
  17. rolandcahen

    rolandcahen

    Joined:
    Oct 1, 2010
    Posts:
    4
    Hello,

    There have been discussions for years now, but no one has done a simple FPC for 3D navigatior, working on both plateforms, using the regular 3DConnexion driver.
    I have tried to download without success a package which was suppose to work, under windows only (I am on Mac as lots of Unity users), tried to include some of the scripts nicely done buy this forum users, but could not make it work.
    I am still using a solution developped in the Topophonie project here by Romain Gora through max/MSP, aka.navigator, OSC, OSC client scripts, keys fake...So complicated!

    I suppose the hole work is a few lines of code for 3dconnexion developpers and lots of possibilities and applications for Unity developpers and users.

    I hope someone will make it soon.

    Roland Cahen
     
  18. Foam Sleeve

    Foam Sleeve

    Joined:
    Oct 5, 2010
    Posts:
    14
    I'll bump that.
     
  19. JFo

    JFo

    Joined:
    Dec 9, 2007
    Posts:
    217
    Coming soon! ;-)
    We have working SpaceNavigator / generic HID device integration for Unity Editor (scene view!) Runtime that requires small cleanup to be released.

    There are versions for Unity Free and Pro (with native plugin) and support for both Windows and OS X...
    We hope to release it within week or two.

    BR,
    Juha
     
  20. Jamoke

    Jamoke

    Joined:
    Feb 16, 2012
    Posts:
    2
    Can't wait! Thanks for working on this.
     
  21. rolandcahen

    rolandcahen

    Joined:
    Oct 1, 2010
    Posts:
    4
    Thanks a lot,
    Could you please post an announcement on this post ?
    Good luck
     
  22. rolandcahen

    rolandcahen

    Joined:
    Oct 1, 2010
    Posts:
    4
    Hello Juha,
    How is it going ?
    When you need beta testers, please let us know.
    Thanks a lot
    R.C.
     
  23. cecarlsen

    cecarlsen

    Joined:
    Jun 30, 2006
    Posts:
    858
    Juha! My payers has been answered! I'd love to be a beta tester. How is it progressing?
     
    Last edited: Apr 3, 2012
  24. cecarlsen

    cecarlsen

    Joined:
    Jun 30, 2006
    Posts:
    858
    Any news?
     
  25. jwick

    jwick

    Joined:
    Apr 10, 2012
    Posts:
    2
  26. cecarlsen

    cecarlsen

    Joined:
    Jun 30, 2006
    Posts:
    858
    Thanks! =)

    It's really nicely integrated in the Editor, but I need it in runtime. Also I think it's overpriced.
     
  27. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,182
    OMG, a mouse with more keys than my keyboard.
     
  28. Jake Fox

    Jake Fox

    Joined:
    Jul 17, 2012
    Posts:
    4
  29. cecarlsen

    cecarlsen

    Joined:
    Jun 30, 2006
    Posts:
    858
    Nice! But 3DThrough is Windows only =(
     
  30. NateJC

    NateJC

    Joined:
    Apr 10, 2012
    Posts:
    58