Trouble with retrieving FloorNormal data


#1

Hi, I’m trying to retrieve the floorplane data detected by Nuitrack SDK.
I use Unity and Intel RealSense D415 for my project development.

I’m developing my own Unity project based on the “Creating your First Unity Project using Nuitrack SDK” tutorial, linked here:
http://download.3divi.com/Nuitrack/doc/UnityBasic_page.html

And this link is what I’ve found from the Nuitrack Forum, with some googling involved:


And in the topic there was a link to a documentation of “UserFrame”:
http://download.3divi.com/Nuitrack/doc/classtdv_1_1nuitrack_1_1UserFrame.html

And I’ve found that there’s another documentation about the “UserFrame” class, under “.NET/C# Wrapper”:
http://download.3divi.com/Nuitrack/doc/classnuitrack_1_1UserFrame.html

I assumed that I should use the C# reference because I’m using Unity environment for my project.
This is what I did to my script:


public Vector3 normal;
private nuitrack.UserFrame UF = new nuitrack.UserFrame();

void Update()
{
if (cnt_update % 2 == 0) //camera was working in 30fps, while the update method was running in 60times/second
{
if (CurrentUserTracker.CurrentUser != 0) //if user is tracked
{

normal = UF.FloorNormal.ToVector3();
Debug.Log(normal);

And after running the project what I get is (0,0,0),
every time it prints the “normal vector” on the debugging console.

I’m a complete newbie on object-oriented languages…
Can anyone help me out? Thanks!


#2

I’ve just found what the problem was… Thanks in advance!