Arhumanbodymanager в iOS не может различить разные человеческие телаIOS

Программируем под IOS
Ответить
Anonymous
 Arhumanbodymanager в iOS не может различить разные человеческие тела

Сообщение Anonymous »

Я использую Arhumanbodymanager под Unity 6, чтобы отслеживать движение человеческого тела. Я строю приложение на iPad Pro с датчиком LIDAR. 6.0.4 < /li>
Unity: ver 6000.0.31f1 < /li>
iPad: 4 Pro (11 дюймов) < /li>
< /ul>
Я использовал следующий код, чтобы попытаться отслеживать различные человеческие тела, предположительно, с различными отслеживаниями.//HumanBodyManager is the ARHumanBodyManager instance
HumanBodyManager.pose3DRequested = true;
HumanBodyManager.pose3DScaleEstimationRequested = true;
HumanBodyManager.trackablesChanged.AddListener(OnTrackableBodiesChanged);
< /code>
internal Dictionary trackedBodies = new Dictionary();

void OnTrackableBodiesChanged(ARTrackablesChangedEventArgs eventArgs) {
//Added
foreach (var humanBody in eventArgs.added){
if (!trackedBodies.ContainsKey(humanBody.trackableId)){
trackedBodies.Add(humanBody.trackableId, humanBody);
Debug.Log($"Body Added: [{humanBody.trackableId}] (currently {trackedBodies.Count} bodies).");
}
}
//Updated
foreach (var humanBody in eventArgs.updated){
if (trackedBodies.ContainsKey(humanBody.trackableId)){
trackedBodies[humanBody.trackableId] = humanBody;
}
}
//Removed
foreach (var (trackableId, _) in eventArgs.removed){
if (trackedBodies.ContainsKey(trackableId)) {
trackedBodies.Remove(trackableId);
Debug.Log($"Body Removed: [{trackableId}] (currently {trackedBodies.Count} bodies).");
}
}
}
< /code>
However, in real case, I found that there is always only 1 tracked human body returned even there are people moving behind the player person. Sometimes it may cause the LiDAR sensor mis-tracking the background person (but with the same trackableId returned to Unity), disrupting the gameplay.
The following is a video on the problem. When some people (not shown in the video) walk behind the player, the skeleton (reflecting the tracked body position) suddenly jumps back.
Video Here
I am wondering if it is the problem of ARHumanBodyManager or the iPad (ARKit 6) itself. Also, are there any solutions to mitigate the effects of such problem.
Thank you for your help.

Подробнее здесь: https://stackoverflow.com/questions/796 ... man-bodies
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «IOS»