<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Maratis forum - Levitate (physics)]]></title>
	<link rel="self" href="http://forum.maratis3d.com/extern.php?action=feed&amp;tid=994&amp;type=atom"/>
	<updated>2014-05-21T08:40:02Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.maratis3d.com/viewtopic.php?id=994</id>
		<entry>
			<title type="html"><![CDATA[Re: Levitate (physics)]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=6803#p6803"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>anael wrote:</cite><blockquote><p>you can apply the inverse of the gravity multiplied by the mass of the object :</p><div class="codebox"><pre><code>-- scene update
function onSceneUpdate()

    addCentralForce(Object, -getGravity()*getMass(Object))

end</code></pre></div><p>and you can additionally do your regular movement :</p><div class="codebox"><pre><code>-- scene update
function onSceneUpdate()

    addCentralForce(Object, -getGravity()*getMass(Object))
    addCentralForce(Object, vec3(0.1, 0.0, 0.0)) -- additional move toward X

end</code></pre></div></blockquote></div><p>Thank you for your advise.<br />I tried it, but up/down force is not elimated fully by “inverse of gravity”. It is necessary additional correcting controll for the object.&nbsp; But I think it wouldn’t be a big problem.:).</p>]]></content>
			<author>
				<name><![CDATA[Tibi]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2804</uri>
			</author>
			<updated>2014-05-21T08:40:02Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=6803#p6803</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Levitate (physics)]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=6802#p6802"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>Tutorial Doctor wrote:</cite><blockquote><p>I actually did this in my artificial intelligence level accidentally. I parented a cone to the object and made the cone a ghost object with physics. </p><p>Now you can check collisions with the cone, and add a central force to the object when something collides with e cone. </p><p>If the cone is rotated towards the ground, and it is long enough, then it will act as a ground detection device, and the object will get a jolt every time the cone touches the ground.</p></blockquote></div><br /><p>Thanks and it&#039;s good idea!<br />But actually my &quot;game concept&quot; is a kind of “helicopter game” where the player have to avoid the ground obstacles. So the player task to control the heli., not necessary automatic controlling.</p>]]></content>
			<author>
				<name><![CDATA[Tibi]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2804</uri>
			</author>
			<updated>2014-05-21T08:01:42Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=6802#p6802</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Levitate (physics)]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=6795#p6795"/>
			<content type="html"><![CDATA[<p>you can apply the inverse of the gravity multiplied by the mass of the object :</p><div class="codebox"><pre><code>-- scene update
function onSceneUpdate()

    addCentralForce(Object, -getGravity()*getMass(Object))

end</code></pre></div><p>and you can additionally do your regular movement :</p><div class="codebox"><pre><code>-- scene update
function onSceneUpdate()

    addCentralForce(Object, -getGravity()*getMass(Object))
    addCentralForce(Object, vec3(0.1, 0.0, 0.0)) -- additional move toward X

end</code></pre></div>]]></content>
			<author>
				<name><![CDATA[anael]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2</uri>
			</author>
			<updated>2014-05-19T16:05:18Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=6795#p6795</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Levitate (physics)]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=6792#p6792"/>
			<content type="html"><![CDATA[<p>I actually did this in my artificial intelligence level accidentally. I parented a cone to the object and made the cone a ghost object with physics. </p><p>Now you can check collisions with the cone, and add a central force to the object when something collides with e cone. </p><p>If the cone is rotated towards the ground, and it is long enough, then it will act as a ground detection device, and the object will get a jolt every time the cone touches the ground.</p>]]></content>
			<author>
				<name><![CDATA[Tutorial Doctor]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2493</uri>
			</author>
			<updated>2014-05-19T13:52:50Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=6792#p6792</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Levitate (physics)]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=6791#p6791"/>
			<content type="html"><![CDATA[<p>I am really sorry of about missing lines of my question. So my question ending: <br />&quot;I raise up/down this object (helicopter) by&nbsp; adding central force, but I can&#039;t&nbsp; helicopter maintain in one place of the air.&quot;. </p><p>If I disable physics, how it will interaction with the word?</p><br /><p>Thanks</p>]]></content>
			<author>
				<name><![CDATA[Tibi]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2804</uri>
			</author>
			<updated>2014-05-19T13:08:20Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=6791#p6791</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Levitate (physics)]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=6790#p6790"/>
			<content type="html"><![CDATA[<p>you can make a ray(from camera) to check if you look at the object, and check distance, then disable physics and change it&#039;s position (using lerp may be)</p>]]></content>
			<author>
				<name><![CDATA[hog]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2795</uri>
			</author>
			<updated>2014-05-19T12:28:05Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=6790#p6790</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Levitate (physics)]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=6787#p6787"/>
			<content type="html"><![CDATA[<p>I need some advise. My question is how can I levitate an object in the air . I raise up/down by using</p>]]></content>
			<author>
				<name><![CDATA[Tibi]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2804</uri>
			</author>
			<updated>2014-05-19T11:27:36Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=6787#p6787</id>
		</entry>
</feed>
