December 2018
Intermediate to advanced
416 pages
10h 30m
English
We need to add or update a PlaneNode whenever a plane is detected or updated. The SetPositionAndRotation() method updates the passed PlaneNode and sets properties on that node based on the content of the AR.Core.Plane object. Let's set this up by going through the following steps:
private void SetPositionAndRotation(Com.Google.AR.Core.Plane plane, PlaneNode node){ node.ExtentX = plane.ExtentX; node.ExtentZ = plane.ExtentZ; node.Rotation = new Quaternion(plane.CenterPose.Qx(), plane.CenterPose.Qy(), plane.CenterPose.Qz(), -plane.CenterPose.Qw()); node.Position = new Vector3(plane.CenterPose.Tx(), ...
Read now
Unlock full access