This project is read-only.

Function to get the position and orientation of the marker?

Mar 27, 2012 at 3:35 AM


I want to use the toolbar as a navigator to the 3DUI(Groundmarker). For example, when I rotate the toolbar the Object on the ground would rotate at the same time. Thus I would like to know is there any function to get the position and orientation of the toolbar?

Mar 27, 2012 at 9:31 PM

toolbarMarkerNode.WorldTransformation.Decompose(.......) method will decompose the marker transformation into translation, rotation, and scale


Mar 28, 2012 at 8:15 PM

Thanks a lot!

Mar 29, 2012 at 8:13 AM


I try to make the selected object move in X axis when the toolbar moves and wrote below:

Vector3 x = new Vector3();

Vector3 y = new Vector3();           

Quaternion outRotation;           

toolbarMarkerNode.WorldTransformation.Decompose(out x, out outRotation, out y);

sphereTransNode.Translation.X = x.X;

But there is an error called "Cannot modify the return value of 'GoblinXNA.SceneGraph.TransformNode.Translation' because it is not a variable "

Could u explain for me why that happen and how could I fix it?

Mar 29, 2012 at 6:54 PM

That's C# thing that you can't modify property's member field, so you need to modify .Translation itself. All of your questions are C# and XNA related, and I prefer not to answer questions that are not specific to GoblinXNA.