On which parameter the “Matrix4x4 poseMatrix” dependant.
Please provide your development details as below;
1. SDK Version: V 4.0.2
2. Development Environment: Unity-Android and Unity-iOS
3. Tracker/Scanner: Cloud Recognition
4. License Type(Free / Pro-One Time Fee / Pro-Subscription / Enterprise): Pro
5. Target Device(Optional):
Hi,
I am using the real scale of my marker and still getting the scaling issue.Ihave some queries regarding the augment positioning cloud you please help me with the answers.
- Why the ARCamera rotated to 90 degree in “CloudRecognizer” scene , and gameobjects inside the CloudTrackable object.
- On which parameter the “Matrix4x4 poseMatrix” in “OnTrackSuccess” method in “CloudTrackableBehaviour.cs” script is depending on. “Matrix4x4 poseMatrix” is used for positioning the Augments.
Attaching the 2 screenShots before and after recognition with image augment.
https://www.dropbox.com/s/mavtlfole5safkz/Static%20Image%20augment%20Before%20Recognition.png?dl=0
https://www.dropbox.com/s/0uu830t08s39pvu/Static%20Image%20augment%20after%20Recognition%20Success.png?dl=0
1. We was need Game View UI because Object Position. that is why we rotate 90.
2. if you don't want use 'CloudTrackableBehaviour.cs', see other sample for unity. https://github.com/maxstdev/MaxstARSDK_Unity_Sample
refer NoImageTrackerble.
Hi,
Example you gave doesn't contain the cloud recognition sample.
Q) On which parameter the “Matrix4x4 poseMatrix” is dependent?
void Update()
{
TrackingState state = TrackerManager.GetInstance().UpdateTrackingState();
cameraBackgroundBehaviour.UpdateCameraBackgroundImage(state);
TrackingResult trackingResult = state.GetTrackingResult();
if (trackingResult.GetCount() > 0)
{
for (int i = 0; i < trackingResult.GetCount(); i++)
{
Trackable trackable = trackingResult.GetTrackable(i);
Matrix4x4 poseMatrix = trackable.GetPose();
float width = trackable.GetWidth();
float height = trackable.GetHeight();
trackingObject.transform.position = MatrixUtils.PositionFromMatrix(poseMatrix);
trackingObject.transform.rotation = MatrixUtils.QuaternionFromMatrix(poseMatrix);
trackingObject.transform.localScale = new Vector3(width, height, height);
}
}
else
{
trackingObject.transform.localScale = new Vector3(0.0f, 0.0f, 0.0f);
}
}
trackingObject is which is 'Tracked Content' at Unity.
'poseMatrix' is parameter as use to tracking Object. that change Scale, Position, Rotation for Object.
Hello,
Since we are using the world space canvas as a augment, images in it are not fitting to the scale of the marker , please provide details on how to make the augment fit into the marker size. (the width settings in maxst are not helping either)
Please refer the screenshot link:
https://www.dropbox.com/s/fyvgn9heovacvdz/worldspace_canvas.png?dl=0
if you set real size 0.1, Tracked Object Scale size must setted 0.1.
if you have image marker real size 0.26*0.195, you must set width 260, height 195. and scale set 0.001.
canvas just set 1920*1080, and Render Mode -> World Space.