<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Maratis forum - Distance examples]]></title>
		<link>http://forum.maratis3d.com/viewtopic.php?id=1004</link>
		<description><![CDATA[The most recent posts in Distance examples.]]></description>
		<lastBuildDate>Mon, 16 Jun 2014 19:01:14 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Distance examples]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6907#p6907</link>
			<description><![CDATA[<p>@ant0n, Thanks for posting ! the more methods we have, the better <img src="http://forum.maratis3d.com/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>@TD, Yeah it&#039;s a good one, what i really like with that app is you can feed it directly with png files, i had some nice results out of it, however tweaking the effet was kinda troublesome, i should try again</p><p>About the animated texture tutorial, there&#039;s a lot of info you don&#039;t even need in it, i&#039;m gonna remake it right now<br />keep you in touch</p><p>Edit : Early rewrite of the tut :<br /><a href="http://forum.maratis3d.com/viewtopic.php?pid=365#p365">http://forum.maratis3d.com/viewtopic.php?pid=365#p365</a></p>]]></description>
			<author><![CDATA[dummy@example.com (Vegas)]]></author>
			<pubDate>Mon, 16 Jun 2014 19:01:14 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6907#p6907</guid>
		</item>
		<item>
			<title><![CDATA[Re: Distance examples]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6906#p6906</link>
			<description><![CDATA[<p>Hey, I went looking for generators, and the first one I came across was this:</p><p><a href="http://www.saschawillems.de/?page_id=253">http://www.saschawillems.de/?page_id=253</a></p><p>Looks promising.</p><p>All I need to know now is how to export this animation, but I think I saw a tutorial either here or on the wiki.</p>]]></description>
			<author><![CDATA[dummy@example.com (Tutorial Doctor)]]></author>
			<pubDate>Mon, 16 Jun 2014 15:42:30 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6906#p6906</guid>
		</item>
		<item>
			<title><![CDATA[Re: Distance examples]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6904#p6904</link>
			<description><![CDATA[<p>Hi all! great examples, Vegas!</p><p>Here is my function of receiving a distance:<br /></p><div class="codebox"><pre><code>function distance(entity1,entity2)
    local pos1 = (getTransformedPosition(entity1))
    local pos2 = (getTransformedPosition(entity2))
    return (math.sqrt(math.abs(math.pow((pos2[1]-pos1[1]),2)+math.pow((pos2[2]-pos1[2]),2) ) ) )
end</code></pre></div><div class="codebox"><pre><code>--the function call:
--1)
print(distance(player, enemy))

--2)
if distance(player, enemy) &lt; 100 then
    --
end</code></pre></div><p>if it is someone useful, can lay out other functions.</p>]]></description>
			<author><![CDATA[dummy@example.com (ant0n)]]></author>
			<pubDate>Mon, 16 Jun 2014 12:21:10 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6904#p6904</guid>
		</item>
		<item>
			<title><![CDATA[Re: Distance examples]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6902#p6902</link>
			<description><![CDATA[<p>There it is, Lord TD <img src="http://forum.maratis3d.com/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /> </p><p>This particular explosion comes from a application called Particle Illusion <br />but basically my method is :</p><p>1) use a Imagemagick script to pack individual frames in a spritesheet<br />2) loading the texture into blender (i have a template for animating textures) <br />3) export. thats it</p><p>I have now a pretty decent collection of animated textures, with some found <br />on OGA, Deviant Art, and some others made with generators,I was planning to make a pack<br /> of these but i could never decide if i put :</p><p>1) Multiple animations on a single texture <br />= Easier to manage, less easier to use, not really tweakable afterward (or painfully)</p><p>or </p><p>2) One texture per animations (so 1 different mesh for each anims)<br />= Easier to use, less easier to manage, easily tweakable </p><p>+ with maratis MGUI that will use FreeImage library, maybe i can use better resolution, easier workflow, i dont know, maybe it&#039;s better to wait a bit</p>]]></description>
			<author><![CDATA[dummy@example.com (Vegas)]]></author>
			<pubDate>Mon, 16 Jun 2014 10:49:14 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6902#p6902</guid>
		</item>
		<item>
			<title><![CDATA[Re: Distance examples]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6901#p6901</link>
			<description><![CDATA[<p>Okay Sir Vegas, those explosions are awesome!!! What was your method?</p>]]></description>
			<author><![CDATA[dummy@example.com (Tutorial Doctor)]]></author>
			<pubDate>Mon, 16 Jun 2014 03:36:26 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6901#p6901</guid>
		</item>
		<item>
			<title><![CDATA[Re: Distance examples]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6895#p6895</link>
			<description><![CDATA[<p>@TD, Yep, something like this (but take care it can be troublesome <br />to use on characters because it will then face the ground <img src="http://forum.maratis3d.com/img/smilies/tongue.png" width="15" height="15" alt="tongue" />)</p><p>@Anael, Outstanding ! Thank you <img src="http://forum.maratis3d.com/img/smilies/wink.png" width="15" height="15" alt="wink" /></p>]]></description>
			<author><![CDATA[dummy@example.com (Vegas)]]></author>
			<pubDate>Sun, 15 Jun 2014 16:00:48 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6895#p6895</guid>
		</item>
		<item>
			<title><![CDATA[Re: Distance examples]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6894#p6894</link>
			<description><![CDATA[<p>So something like?:<br /></p><div class="codebox"><pre><code>person = getObject(&quot;Person&quot;)
building = getObject(&quot;Building&quot;)
building2 = getObject(&quot;Building2&quot;)

--Person object should have LookAt behavior
translate(Person,{0,0,-1},&quot;local)

if isCollisionBetween(person,building) then
    setBehaviorVariable(Person,0,&quot;target&quot;,&quot;building2&quot;)
end</code></pre></div><p><a href="http://wiki.maratis3d.org/index.php?title=SetBehaviorVariable">http://wiki.maratis3d.org/index.php?tit &#133; orVariable</a></p><p>I will check this out later. Thanks.</p>]]></description>
			<author><![CDATA[dummy@example.com (Tutorial Doctor)]]></author>
			<pubDate>Sun, 15 Jun 2014 15:35:20 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6894#p6894</guid>
		</item>
		<item>
			<title><![CDATA[Re: Distance examples]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6893#p6893</link>
			<description><![CDATA[<p>to convert % in position, just use the start and end positions :</p><p>- convert your % to a number between 0 and 1 : factor = percent*0.01<br />- then : pos = start_pos + (end_pos - start_pos)*factor</p>]]></description>
			<author><![CDATA[dummy@example.com (anael)]]></author>
			<pubDate>Sun, 15 Jun 2014 15:30:24 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6893#p6893</guid>
		</item>
		<item>
			<title><![CDATA[Re: Distance examples]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6891#p6891</link>
			<description><![CDATA[<p>Glad it helped <img src="http://forum.maratis3d.com/img/smilies/wink.png" width="15" height="15" alt="wink" /></p><div class="quotebox"><blockquote><p>guide an object along a path</p></blockquote></div><p>oh you need almost nothing to do this, from an empty project :</p><p>add 3 cubes, spread them, and name them :</p><p>Player<br />TargetA<br />TargetB</p><p>then put a LookAt behavior on the Player, with TargetA as target </p><p>and in script you could do</p><p>translate(Player, {0, 0, -1}, &quot;local&quot;)</p><p>(negative value on Z axis on a object who got LookAt on it, will always move toward his target)</p><p>And when it reaches TargetA and collide with physics, distance or whatever, change behavior to<br />setBehaviorVariable(Player, 0, &quot;target&quot;, &quot;TargetB&quot;)</p><p>I will update the 2nd and 3nd examples this evening, while i was fighting with my projects i got some ideas <img src="http://forum.maratis3d.com/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[dummy@example.com (Vegas)]]></author>
			<pubDate>Sun, 15 Jun 2014 15:22:58 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6891#p6891</guid>
		</item>
		<item>
			<title><![CDATA[Re: Distance examples]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6890#p6890</link>
			<description><![CDATA[<p>So wait, I have a question, that DistancePercent thing has a box going from one point to another. So, I could use this to guide an object along a path then?</p><p>Also, the radius thing sort of acts like a wind system for particles.</p>]]></description>
			<author><![CDATA[dummy@example.com (Tutorial Doctor)]]></author>
			<pubDate>Sun, 15 Jun 2014 14:57:11 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6890#p6890</guid>
		</item>
		<item>
			<title><![CDATA[Re: Distance examples]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6889#p6889</link>
			<description><![CDATA[<p>Nice!!! This solves my distance issue. I guess I can pick back up on that AI system.</p><p>I needed distance detection for the 5 senses, and also for the fuzzy logic I was trying to implement.</p>]]></description>
			<author><![CDATA[dummy@example.com (Tutorial Doctor)]]></author>
			<pubDate>Sun, 15 Jun 2014 14:03:00 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6889#p6889</guid>
		</item>
		<item>
			<title><![CDATA[Re: Distance examples]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6888#p6888</link>
			<description><![CDATA[<p>Ooops thanks for the feedback, i fixed that <img src="http://forum.maratis3d.com/img/smilies/smile.png" width="15" height="15" alt="smile" /><br />for the third example i forgot to put instructions on screen, you needed to press &quot;1&quot; to spawn the clones</p><p>Im gonna add one or two more levels to this project later on,<br />a LookAt alternative like you suggested me a while back (with getLength3d(vec), normalize3d(vec) stuff)<br />and a mix-up of the 3 first examples</p><p>Oh and while i&#039;m at it, for the first example, do you know if that&#039;s possible to <br />convert back the % value to position ?</p><p>I wanted to spawn clones between point A &amp; B at a given % when launching the game,<br />(lets say 1 clones every 10%) but didn&#039;t succeed</p>]]></description>
			<author><![CDATA[dummy@example.com (Vegas)]]></author>
			<pubDate>Sun, 15 Jun 2014 11:50:42 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6888#p6888</guid>
		</item>
		<item>
			<title><![CDATA[Re: Distance examples]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6887#p6887</link>
			<description><![CDATA[<p>that&#039;s awesome !</p><p>The Radius collision detection mproj is not connected to the correct level by default,<br />I just loaded the good level and it worked.</p><p>But I didn&#039;t managed to make the Spawn multiple clones level working.</p>]]></description>
			<author><![CDATA[dummy@example.com (anael)]]></author>
			<pubDate>Sun, 15 Jun 2014 11:13:22 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6887#p6887</guid>
		</item>
		<item>
			<title><![CDATA[Distance examples]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6885#p6885</link>
			<description><![CDATA[<p>here&#039;s 1 project with 3 levels about distance, pretty bad explained (or not at all) i&#039;m afraid !<br />but if it can give you some ideas it&#039;s all good </p><p>• <a href="https://dl.dropboxusercontent.com/u/19970067/Maratis/DistanceExamples/DistanceExamples.rar">Project</a></p><p>1) Calculate distance between meshes in percent<br /><span class="postimg"><img src="https://dl.dropboxusercontent.com/u/19970067/Maratis/DistanceExamples/DistancePercent.jpg" alt="PunBB bbcode test" /></span></p><br /><p>2) Radius collision detection, based on anael&#039;s method over here : <a href="http://forum.maratis3d.com/viewtopic.php?pid=6296#p6296">http://forum.maratis3d.com/viewtopic.php?pid=6296#p6296</a><br /><span class="postimg"><img src="https://dl.dropboxusercontent.com/u/19970067/Maratis/DistanceExamples/RadiusCollision.jpg" alt="PunBB bbcode test" /></span></p> <br /><p>3) Spawn multiple clones in a given object perimeter<br /><span class="postimg"><img src="https://dl.dropboxusercontent.com/u/19970067/Maratis/DistanceExamples/SpawnInRadius.jpg" alt="PunBB bbcode test" /></span></p><p>4) Spawn in Radius v2, will spawn animated texture at random positions on a controllable radius<br /><span class="postimg"><img src="https://dl.dropboxusercontent.com/u/19970067/Maratis/DistanceExamples/SpawnInRadius_v2.jpg" alt="PunBB bbcode test" /></span></p><br /><br /><p>Notes : I removed the object parenting in example 2, and use follow behavior instead</p>]]></description>
			<author><![CDATA[dummy@example.com (Vegas)]]></author>
			<pubDate>Sat, 14 Jun 2014 19:29:19 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6885#p6885</guid>
		</item>
	</channel>
</rss>
