<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Maratis forum - How to parent object to bone in C++?]]></title>
	<link rel="self" href="http://forum.maratis3d.com/extern.php?action=feed&amp;tid=1273&amp;type=atom"/>
	<updated>2017-05-24T07:52:11Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.maratis3d.com/viewtopic.php?id=1273</id>
		<entry>
			<title type="html"><![CDATA[Re: How to parent object to bone in C++?]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=8149#p8149"/>
			<content type="html"><![CDATA[<p>I have solved it, adding this code in the update function:</p><div class="codebox"><pre><code>MOEntity * weapon = scene-&gt;getEntityByName(&quot;star&quot;);
MOEntity * keyla = scene-&gt;getEntityByName(&quot;ky&quot;); 
MOBone * bone = keyla-&gt;getMesh()-&gt;getArmature()-&gt;getBoneByName(&quot;IK.hand.R&quot;);
        
weapon-&gt;setPosition(  keyla-&gt;getTransformedVector( bone-&gt;getTransformedPosition() ) );
weapon-&gt;setEulerRotation(   bone-&gt;getEulerRotation() + keyla-&gt;getEulerRotation() );</code></pre></div>]]></content>
			<author>
				<name><![CDATA[ArielRiv]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2860</uri>
			</author>
			<updated>2017-05-24T07:52:11Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=8149#p8149</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[How to parent object to bone in C++?]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=8148#p8148"/>
			<content type="html"><![CDATA[<p>I have tried in several ways to link an object to a bone (for example, to match a weapon to the hand of a character) but I have had difficulties with the transformations and I have not been able to solve them</p>]]></content>
			<author>
				<name><![CDATA[ArielRiv]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2860</uri>
			</author>
			<updated>2017-05-20T02:21:28Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=8148#p8148</id>
		</entry>
</feed>
