Search Unity

Getting axis input through sockets

Discussion in 'Formats & External Tools' started by cry0, Apr 7, 2010.

  1. cry0

    cry0

    Joined:
    Apr 9, 2009
    Posts:
    71
    Hi everyone,

    I have an image tracking system that is able to recognize human gestures, transform them into X/Y coordinates and transmit them using sockets.

    Is it possible to receive this kind of input in unity? I wouldn't want to have to develop a middleware to transform them into mouse or joystick input.

    Many thanks,
    Tiago
     
  2. Cyclops

    Cyclops

    Joined:
    Jan 31, 2010
    Posts:
    111
    Definitely. Unity uses .NET (technically Mono), which includes full Socket support. Or, to quote from the Unity License:

    "Use .NET sockets to connect with virtually any back-end technology you want to create network-aware content that offers a dynamic and ever-changing game play experience. .NET socket libraries can be used for real-time networking, by opening TCP/IP sockets or sending UDP messages."

    If you want to see some sample code, I posted some at: .NET Remoting with Unity. It wasn't the right answer to the Question :) but that doesn't mean the code itself is wrong.

    John C>
    "For all your days, prepare, and meet them ever alike;
    When you are the anvil, bear - when the hammer, strike."
     
  3. ktannous

    ktannous

    Joined:
    Jul 6, 2021
    Posts:
    1
    where you able to get it done ?
    I am doing something similar and I need help with that as well