<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Maratis forum - Object Velocity]]></title>
	<link rel="self" href="http://forum.maratis3d.com/extern.php?action=feed&amp;tid=715&amp;type=atom"/>
	<updated>2013-08-02T12:57:04Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.maratis3d.com/viewtopic.php?id=715</id>
		<entry>
			<title type="html"><![CDATA[Re: Object Velocity]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=4506#p4506"/>
			<content type="html"><![CDATA[<p>Thank you so much for all the help you have given me. It&#039;s working very well now that I have made the adjustments you recommended, thank you again for taking the time and helping a beginner.</p>]]></content>
			<author>
				<name><![CDATA[Riddikk]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2448</uri>
			</author>
			<updated>2013-08-02T12:57:04Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=4506#p4506</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Object Velocity]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=4505#p4505"/>
			<content type="html"><![CDATA[<p>first this two line need to be inside onSceneUpdate :<br />force = getCentralForce(Player)<br />speed = length(force)</p><p>but you are not using &quot;force&quot; or &quot;speed&quot; variables.</p><p>What is the problem with your script ? is it not compiling or just acting strange ?</p><p>I don&#039;t know what your script does exactly, but I can say that you should do &quot;thrust cap&quot; after &quot;raise thrust\lower&quot; and not before.</p><p>If you just want to add this velocity limitation we talked about, try to add this after &quot;--Movement RCS&quot; block :</p><div class="codebox"><pre><code>force = getCentralForce(Player)
speed = length(force)

if speed &gt; maxSpeed then
    addCentralForce(Player, force*(-0.1))
end</code></pre></div>]]></content>
			<author>
				<name><![CDATA[anael]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2</uri>
			</author>
			<updated>2013-08-02T12:40:06Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=4505#p4505</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Object Velocity]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=4504#p4504"/>
			<content type="html"><![CDATA[<p>Thank you for the help I am sure this works .However I am too big of an idiot to implement it properly, so I did not manage to make it work .I am sorry to waste your time and I&#039;m sure you have better things to do but can you please take a look on my script? <a href="http://db.tt/uiNNfUcQ">http://db.tt/uiNNfUcQ</a></p>]]></content>
			<author>
				<name><![CDATA[Riddikk]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2448</uri>
			</author>
			<updated>2013-08-02T11:43:25Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=4504#p4504</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Object Velocity]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=4503#p4503"/>
			<content type="html"><![CDATA[<p>I think you can do something like that in lua, I&#039;m not sure how precise it will be but it should work.</p><p>you can try to normalize the force if the speed reach some amount :</p><div class="codebox"><pre><code>force = getCentralForce(object)
speed = length(force)

if speed &gt; maxSpeed then
    force = normalize(force)*maxSpeed
    clearForces(object)
    addCentralForce(object, force)
    -- you might need to do the same with the torque if you want to limit rotation speed too
end</code></pre></div><p>or by applying an inverse force if you want it to be more smooth :</p><div class="codebox"><pre><code>force = getCentralForce(object)
speed = length(force)

if speed &gt; maxSpeed then
    addCentralForce(object, force*(-0.01))
end</code></pre></div>]]></content>
			<author>
				<name><![CDATA[anael]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2</uri>
			</author>
			<updated>2013-08-02T09:50:21Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=4503#p4503</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Object Velocity]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=4502#p4502"/>
			<content type="html"><![CDATA[<p>Yes the object should behave normally with no damping or any kind of resistance but could not go faster than a certain velocity. Is this possible?</p>]]></content>
			<author>
				<name><![CDATA[Riddikk]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2448</uri>
			</author>
			<updated>2013-08-02T07:48:20Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=4502#p4502</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Object Velocity]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=4501#p4501"/>
			<content type="html"><![CDATA[<p>Hi,</p><p>do you mean like the object should behave normally with no damping but could not go faster than a certain velocity ?<br />or do you mean the object will be affected by a sort of resistance or friction ?</p>]]></content>
			<author>
				<name><![CDATA[anael]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2</uri>
			</author>
			<updated>2013-08-02T00:14:32Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=4501#p4501</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Object Velocity]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=4499#p4499"/>
			<content type="html"><![CDATA[<p>Hello, <br />I am sorry to be a bother but I have a small question. Is there a way to limit an objects velocity and not use the damping?</p>]]></content>
			<author>
				<name><![CDATA[Riddikk]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2448</uri>
			</author>
			<updated>2013-08-02T00:04:52Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=4499#p4499</id>
		</entry>
</feed>
