HierarchicalNode transform removed when parented.

Mar 11, 2011 at 11:29 PM

I'm not entirely sure what the issue is here, but to put it simply; I've created my own asset type and loaded the geometry in from a file. I've also applied a transform matrix that has also been loaded from a file. This matrix is assigned to the geometry's RenderingWorld property. Another point to note, is that the custom asset contains these loaded instances of the Geometry class as asset parts.

This set up works fine as-is, and the model is rendered in the viewport, transforms and all. However, the click and rotate feature native to Balder does not work on this custom asset. I found out it was because the intersection occurs on the root component, and not it's children, since they have not been added as children. As such, I attempt to add them as children and viola! The rotation is back.

Now that would be awesome, aside from one rather major set back. When the child components (the Geometry instances) are parented to the root component (using this.Children.Add), they seem to lose all transform data and are subsequently rendered in the same position (effectively hiding all components that are the same).

This might need a bit of further explanation, but if anyone has any suggestions/ideas I would really appreciate it. In the meantime, I shall continue to investigate and see if I can resolve the issue myself.

Thanks in advance!

Mar 15, 2011 at 6:03 PM

I'm not sure I'm following - but if you'd like you could drop me an email with your project : einar [at] dolittle [dot] com

Mar 15, 2011 at 6:23 PM

I actually think I sorted it. The issue was occurring when I was setting the Node.RenderTransform value directly with the required matrix, but when the node was added as a child to the hierarchical node, it appeared to recalculate the transform based on its position, rotation and scale.

This lead me to try and use the required matrix to transform the relevant values, and it now works again.

From: adept [email removed]
Sent: 15 March 2011 17:04
To: neo_ze_torro@hotmail.com
Subject: Re: HierarchicalNode transform removed when parented. [Balder:249391]

From: adept

I'm not sure I'm following - but if you'd like you could drop me an email with your project : einar [at] dolittle [dot] com