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

Unity Freezes

Discussion in 'Editor & General Support' started by smithmachine, Apr 18, 2019.

  1. smithmachine

    smithmachine

    Joined:
    Apr 17, 2019
    Posts:
    5
    Hi guys,

    I am a medical student and I'm trying to create a set up with Unity to do research. However, I'm facing technical difficulties, and my code skills aren't that strong, so I'm reaching out. Hope somebody can shed some light on the code.

    I want subjects to put on a virtual reality goggle (HTC Vive 2.0) and have them see three moving dots, rotating around the center dot. So I've attached a script to my object in Unity.

    The information about how the movement should be performed is sent out via TCP connection on another computer through LabVIEW, basically, an array sending out information about the position. The information in the array is packed in an x,y,z, roll, pitch, yaw format. The information is sent out with a variable output frequency (preferably 100Hz). Then the script on the Unity object should receive this information.

    The problem is that the object in Unity freezes if I use an output frequency around 100Hz, whereas it seems to produce more robust results if I set the output frequency to 50Hz.

    To address this problem I've received a script from a friend (he is on holiday so I can't ask him, unfortunately) which shouldn't have this problem. But his script only has information about the position, and not about rotating (roll, pitch, yaw). The old script did have some code in it to receive information about rotation.

    1) Can anybody help me implementing the rotation [roll, pitch, yaw] in the new script?

    Or,

    2) if possible, can somebody help me rewriting the old script so it doesn't freeze anymore if I set the output frequency >50Hz?


    P.S. I can provide the graphical LabVIEW code if requested, don't know if that complicates things for now.
     

    Attached Files:

    Last edited: Apr 18, 2019