hi, i want to create a custom multi target to use in unity but i have problems with rotation. i've read the dev guide about multi target creation and i've been looking into the sample app. however i couldn't find out how to apply multiple rotations around different axes to a target. in the sample all parts are just rotated around one axis. for example what exactly would i have to do to apply an additional rotation, let's say 45° around the x-axis, to this part?

also, just out of interest, what does the "AD:" stand for? i hope someone can help me out here. kind regards, stefan

I think, I finally made it !!!

I use the function :

`ToAngleAxis (out angle, out axis);`

To convert the rotation of a individual target in an axis rotation that is something i can use to write in the part of a multi target like this:

```individualTargetTransform.localRotation.ToAngleAxis (out angle, out axis);

part.SetAttribute ("rotation", "AD: " + Mathf.Round (axis.x * -100f) / 100f + " " + Mathf.Round (axis.z * -100f) / 100f + " " + Mathf.Round (axis.y * 100f) / 100f + " " + Mathf.Round (angle * 100f) / 100f);
```

I hope this help.

:)

Note however that a simple workaround for this issue is to simply compute the "combined rotation" (i.e. the result of multiplying the first and the second rotation) and setting it into the XML file.

Not true. We went through a bit of effort on this side to compute that rotation and we ended up with a python script that will take the rotations (entered through the Unity GUI), and come out with a combined rotation that looks good when entered into the xml. However, this screws up royally when running the application, where it keeps finding all sorts of weird camera angles, but not the correct one. Let me know if you want an example and I can post it for you to test.

I suggest fixing that bug on the vuforia side, because hacking around it in the user side isn't working. Specifically, I think that vuforia should let you just place a bunch of image markers and make them into a multi-marker

Hi,

I have filed an ew bug report to our engineering team so that they can look at this and possibly fix in next release

(note Ksiva (Km) is no longer in the Vuforia team and this 3-year old thread might have got stuck somewhere at that time).

Note however that a simple workaround for this issue is to simply compute the "combined rotation" (i.e. the result of multiplying the first and the second rotation) and setting it into the XML file.

It seems like it is the same since 3 years ago.

We'll fix this issue in a future release, thanks again for the bug report!

hi kim,
i'll try how it works asap. however in my project i would definitely need to have visual feedback on the targets in the editor.
if there is any chance to make this possible before the next release (when ever it might be) it would be a great help!

kind regards,
stefan

Hi Stefann,

Thanks for pointing out a limitation of the Unity extension, there is a bug here. I think we can get past it though.

From the Dev Guide:

Quote:

Rotations are defined as a series of axis and angle pairs that are applied in order.

The syntax is something like this:

```<Part name="FlakesBox.Back" translation="0 0 -30" rotation="AD: 0 1 0 180; 1 0 0 45" />
```

Now unfortunately Unity won't like that very much, it will complain about an invalid Part and decide not to render that surface in the editor. That doesn't affect the runtime at all, however. The Part will have the expected orientation from the tracker's perspective.

Let me know if you really need to be able to visualize the target in the editor, and we can work on that code. It should just require some changes to ConfigParser.cs.

We'll fix this issue in a future release, thanks again for the bug report!

- Kim

p.s. AD stands for "Angle Degrees" I believe.