04-18-2019 07:11 AM
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've already tried asking this question on the Unity board but they can't seem to help me, so I'm trying it on the LabVIEW board although it might be a bit misplaced.
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 LabVIEW vi. if requested, don't know if that complicates things for now.
04-18-2019 07:15 AM - edited 04-18-2019 07:16 AM
I doubt you'll get much help on this forum unless there is someone here familiar with this 3rd part software.
Your question is about the Unity software programming, and isn't about LabVIEW programming.
Good luck!
04-18-2019 07:18 AM
@smithmachine wrote:
P.S. I can provide the LabVIEW vi. if requested, don't know if that complicates things for now.
As this is a LabVIEW Forum, and you can expect to find LabVIEW experts here, the best thing you could have done would be to attach the VIs (LabVIEW code). Some of us may have no idea what a .cs file means, and I, in particular, find pictures entirely unhelpful and frustrating (unless it shows pictures of equipment to show where the physical wires and resistors are connected ...).
Bob Schor
04-18-2019 07:24 AM
Nevermind then, how do I delete my topic?
04-18-2019 04:18 PM
There's a 3d vision group on here, might be able to help a bit.
I do quite a bit of 3d modelling and manipulation in LabVIEW, but purely in LabVIEW, so I think I cannot advise on your specific problem.
Try posting here, perhaps someone has specific experience can help
https://forums.ni.com/t5/3D-Vision/gp-p/5002
0xDEAD