- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Camera Model D415
Firmware Version 05.11.06.250
Operating System & Version Windows 10
Platform PC
SDK Version2.latest
Language Unity c#
I am trying to get the in scene location (x,y,z) for the highest point/points from the depth points. My immediate goal is to assign a simple 3D object (cube) to the highest points and have them move as the as the position of the highest point changes realtime -> ie the Vector3 transform
I was planning on using something like this - which obviously wont work since the shader forces a vertex count. IS there a way to get the position of the points? or assign a cube to the highest point in the depth array?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Zenith : MonoBehaviour
{
public MeshFilter RTMesh;
public GameObject cube;
private Vector3[] verts;
Vector3 TopVertex;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
verts = RTMesh.sharedMesh.vertices;
TopVertex = new Vector3(0, float.NegativeInfinity, 0);
for (int i = 0; i < verts.Length; i++)
{
Vector3 vect = transform.TransformPoint(verts[i]);
if (vect.y > TopVertex.y)
{
TopVertex = vect;
cube.transform.position = TopVertex;
}
}
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The RealSense GitHub, where you have also posted this question, is the best place to get advice on this subject. Good luck!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The RealSense GitHub, where you have also posted this question, is the best place to get advice on this subject. Good luck!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page