466 lines
23 KiB
HTML
466 lines
23 KiB
HTML
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|||
|
<html>
|
|||
|
<head>
|
|||
|
<title><EFBFBD>berTools Game Development Kit</title>
|
|||
|
<link rel="stylesheet" href="style.css">
|
|||
|
<script type="text/javascript">
|
|||
|
|
|||
|
/***********************************************
|
|||
|
* Switch Menu script- by Martial B of http://getElementById.com/
|
|||
|
* Modified by Dynamic Drive for format & NS4/IE4 compatibility
|
|||
|
* Visit http://www.dynamicdrive.com/ for full source code
|
|||
|
***********************************************/
|
|||
|
|
|||
|
if (document.getElementById){ //DynamicDrive.com change
|
|||
|
document.write('<style type="text/css">\n')
|
|||
|
document.write('.submenu{display: none;}\n')
|
|||
|
document.write('</style>\n')
|
|||
|
}
|
|||
|
|
|||
|
function SwitchMenu(obj){
|
|||
|
if(document.getElementById){
|
|||
|
var el = document.getElementById(obj);
|
|||
|
var ar = document.getElementById("masterdiv").getElementsByTagName("span"); //DynamicDrive.com change
|
|||
|
if(el.style.display != "block"){ //DynamicDrive.com change
|
|||
|
for (var i=0; i<ar.length; i++){
|
|||
|
if (ar[i].className=="submenu") //DynamicDrive.com change
|
|||
|
ar[i].style.display = "none";
|
|||
|
}
|
|||
|
el.style.display = "block";
|
|||
|
}else{
|
|||
|
el.style.display = "none";
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
</script>
|
|||
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|||
|
</head>
|
|||
|
<body>
|
|||
|
<a name="top"></a>
|
|||
|
<table width="702" border="0" align="center" cellpadding="0" cellspacing="0">
|
|||
|
<tr>
|
|||
|
<td colspan="3"><img src="../images/header.jpg" width="702" height="101" border="0"></td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td width=158 valign="top"><table border="0" cellspacing="0" cellpadding="0">
|
|||
|
<tr>
|
|||
|
<td valign="top" class="menu">
|
|||
|
<!-- Keep all menus within masterdiv-->
|
|||
|
<div id="masterdiv">
|
|||
|
<img src="../images/navigation.jpg" width="158" height="27"><br>
|
|||
|
UberTools GDK
|
|||
|
<div class="menutitle" onclick="SwitchMenu('sub0')">» Introduction & Contents</div>
|
|||
|
<span class="submenu" id="sub0">
|
|||
|
<a href="../start.html">Introduction</a><br>
|
|||
|
<a href="../start.html#2">Utilities</a><br>
|
|||
|
<a href="../start.html#3">Source Files</a><br>
|
|||
|
</span>
|
|||
|
<br>Level Design<br>
|
|||
|
<div class="menutitle" onclick="SwitchMenu('sub1')">» Setting Up UberRadiant</div>
|
|||
|
<span class="submenu" id="sub1">
|
|||
|
<a href="radiant_setup.html">That Scary Error Msg</a><br>
|
|||
|
<a href="radiant_setup.html#2">General Tab</a><br>
|
|||
|
<a href="radiant_setup.html#3">Display Tab</a><br>
|
|||
|
<a href="radiant_setup.html#4">User Interface Tab</a><br>
|
|||
|
<a href="radiant_setup.html#5">Keyboard Shortcuts Tab</a><br>
|
|||
|
<a href="radiant_setup.html#6">Colors Tab</a><br>
|
|||
|
<a href="radiant_setup.html#7">Game / Paths Tab</a><br>
|
|||
|
</span>
|
|||
|
<div class="menutitle" onclick="SwitchMenu('sub2')">» Building Your First Room</div>
|
|||
|
<span class="submenu" id="sub2">
|
|||
|
<a href="radiant_firstroom.html">Editor Interface Basics</a><br>
|
|||
|
<a href="radiant_firstroom.html#2">Choosing Your Textures</a><br>
|
|||
|
<a href="radiant_firstroom.html#3">Building The Room</a><br>
|
|||
|
<a href="radiant_firstroom.html#4">Adding a Light</a><br>
|
|||
|
<a href="radiant_firstroom.html#5">Adding a Player Start</a><br>
|
|||
|
<a href="radiant_firstroom.html#6">Compiling Your Level</a><br>
|
|||
|
<a href="radiant_firstroom.html#7">Viewing the Level</a><br>
|
|||
|
</span>
|
|||
|
<div class="menutitle" onclick="SwitchMenu('sub3')">» Constructing Terrain</div>
|
|||
|
<span class="submenu" id="sub3">
|
|||
|
<a href="radiant_terrain.html">Setting up the Tools</a><br>
|
|||
|
<a href="radiant_terrain.html#2">Creating Terrain</a><br>
|
|||
|
<a href="radiant_terrain.html#3">Modifying the Textures</a><br>
|
|||
|
<a href="radiant_terrain.html#4">Adding More Terrain</a><br>
|
|||
|
</span>
|
|||
|
<div class="menutitle" onclick="SwitchMenu('sub4')">» Additional Reference</div>
|
|||
|
<span class="submenu" id="sub4">
|
|||
|
<a href="ldesign_lighting.html">Lighting System</a><br>
|
|||
|
<a href="ldesign_terrain.html">Terrain Texture Blending</a><br>
|
|||
|
</span>
|
|||
|
<br>Scripting<br>
|
|||
|
<div class="menutitle" onclick="SwitchMenu('sub5')">» Scripting Tutorials</div>
|
|||
|
<span class="submenu" id="sub5">
|
|||
|
<a href="scripting_syntax.html">Scripting Syntax</a><br>
|
|||
|
<a href="scripting_waves.html">Spawning Waves</a><br>
|
|||
|
<a href="scripting_flying.html">Creating Flying Creatures</a><br>
|
|||
|
<a href="scripting_tripwires.html">Setting Up Tripwires</a><br>
|
|||
|
</span>
|
|||
|
<div class="menutitle" onclick="SwitchMenu('sub6')">» Global Script Synopsis</div>
|
|||
|
<span class="submenu" id="sub6">
|
|||
|
<a href="scripting_globalscripts.html">Introduction</a><br>
|
|||
|
<a href="scripting_globalscripts_accelmove.html">global_accelerated</a><br>
|
|||
|
<a href="scripting_globalscripts_accelmove.html">Movement.scr</a><br>
|
|||
|
<a href="scripting_globalscripts_archetype.html">global_archetype.scr</a><br>
|
|||
|
<a href="scripting_globalscripts_array.html">global_array.scr</a><br>
|
|||
|
<a href="scripting_globalscripts_cinefx.html">global_cinematicFX.scr</a><br>
|
|||
|
<a href="scripting_globalscripts_common.html">global_common.scr</a><br>
|
|||
|
<a href="scripting_globalscripts_debug.html">global_debugUtils.scr</a><br>
|
|||
|
<a href="scripting_globalscripts_flyin.html">global_flyin.scr</a><br>
|
|||
|
<a href="scripting_globalscripts_math.html">global_math.scr</a><br>
|
|||
|
<a href="scripting_globalscripts_ploadout.html">global_playerLoadout.scr</a><br>
|
|||
|
<a href="scripting_globalscripts_soundpan.html">global_soundPan.scr</a><br>
|
|||
|
<a href="scripting_globalscripts_spawnwave.html">global_spawnWave.scr</a><br>
|
|||
|
<a href="scripting_globalscripts_transport.html">global_Transport.scr</a><br>
|
|||
|
<a href="scripting_globalscripts_tripwire.html">global_tripwire.scr</a><br>
|
|||
|
</span>
|
|||
|
<div class="menutitle" onclick="SwitchMenu('sub7')">» Classes Reference</div>
|
|||
|
<span class="submenu" id="sub7">
|
|||
|
<a href="allclasses_g.html">Game Module</a><br>
|
|||
|
<a href="allclasses_cl.html">Client Module</a><br>
|
|||
|
<a href="allclasses_cg.html">Client Game Module</a><br>
|
|||
|
</span>
|
|||
|
<br>Older Documentation<br>
|
|||
|
<div class="menutitle" onclick="SwitchMenu('sub8')">» Heavy Metal FAKK2</div>
|
|||
|
<span class="submenu" id="sub8">
|
|||
|
<a href="fakk2_camera.html">Camera Documentation</a><br>
|
|||
|
<a href="fakk2_clientsidecmds.html">Client Side Commands</a><br>
|
|||
|
<a href="fakk2_gui.html">GUI Documentation</a><br>
|
|||
|
<a href="fakk2_ingameutils.html">In-Game Utilities</a><br>
|
|||
|
<a href="fakk2_max2skl.html">MAX2SKL Reference</a><br>
|
|||
|
<a href="fakk2_shadermanual.html">Shader Manual</a><br>
|
|||
|
<a href="fakk2_soundsystem.html">Sound System</a><br>
|
|||
|
<a href="fakk2_tiki.html">TIKI Model System</a><br>
|
|||
|
</span>
|
|||
|
<br>Other<br>
|
|||
|
<div class="menutitle" onclick="SwitchMenu('sub9')">» Web Links & Credits</div>
|
|||
|
<span class="submenu" id="sub9">
|
|||
|
<a href="other_links.html">Web Links</a><br>
|
|||
|
<a href="other_credits.html">Credits</a><br>
|
|||
|
</span>
|
|||
|
</div>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
</table></td>
|
|||
|
<td width="13" background="../images/vert_line.jpg"><img src="../images/vert_line.jpg" width="13" height="1"></td>
|
|||
|
<td valign="top" width="533"><p class="header"><br>
|
|||
|
global_math.scr</p>
|
|||
|
<p class="subheader">Dependencies</p>
|
|||
|
<p> #include "maps/global_scripts/global_common.scr"</p>
|
|||
|
<p class="subheader">Purpose</p>
|
|||
|
<p> These are a general set of math functions that can be used</p>
|
|||
|
<p class="subheader"> How To Use</p>
|
|||
|
<p> Refer to each functions description</p>
|
|||
|
<p class="subheader">External Functions</p>
|
|||
|
<p> <strong>float globalMath_NormalizeAngleTo360Degrees( degrees )</strong>
|
|||
|
</p>
|
|||
|
<blockquote>
|
|||
|
<p> <strong>Purpose:</strong><br>
|
|||
|
Takes any degree-angle and forces it into the range [0,360]. The new
|
|||
|
angle value is returned.</p>
|
|||
|
<p><strong>Returns:</strong><br>
|
|||
|
Float. The new normalized angle results.</p>
|
|||
|
</blockquote>
|
|||
|
<ul type="square">
|
|||
|
<strong>Parms:</strong>
|
|||
|
<li> <strong>degrees</strong> - (float)<br>
|
|||
|
T he angle to normalize to the range [0,360]</li>
|
|||
|
</ul>
|
|||
|
<p> <strong>float globalMath_GetCircularDistanceInDegrees( degreeAngle1,
|
|||
|
degreeAngle2 )</strong></p>
|
|||
|
<blockquote>
|
|||
|
<p> <strong>Purpose:</strong><br>
|
|||
|
Returns the distance from one point on a circle to another point on
|
|||
|
that same circle, given in degrees.</p>
|
|||
|
<p><strong>Returns:</strong><br>
|
|||
|
Float. The radial distance in degrees one point is from another. If
|
|||
|
the return value is positive, the closest path is counter-clockwise,
|
|||
|
else if it's negative, it is clockwise.</p>
|
|||
|
</blockquote>
|
|||
|
<ul type="square">
|
|||
|
<strong>Parms:</strong>
|
|||
|
<li> <strong>degreeAngle1</strong> (float)<br>
|
|||
|
The angle, in degrees, of the starting point.<br>
|
|||
|
<br>
|
|||
|
</li>
|
|||
|
<li> <strong>degreeAngle2</strong> (float)<br>
|
|||
|
The angle, in degrees, of the ending point.</li>
|
|||
|
</ul>
|
|||
|
<p> <strong>float globalMath_GetXYAngleForPointAboutCenter( point, center
|
|||
|
) </strong></p>
|
|||
|
<blockquote>
|
|||
|
<p> <strong>Purpose:</strong><br>
|
|||
|
Takes the center origin of a circle, and an orbiting point on the circle,
|
|||
|
and calculates the angle in degrees where the oribiting point is located.
|
|||
|
0 degrees being due East.</p>
|
|||
|
<p><strong>Returns:</strong><br>
|
|||
|
float, the angle in degrees where the oribiting point is on the circle
|
|||
|
relative to the passed center coordinate vector. For reference, the
|
|||
|
4 main points are:</p>
|
|||
|
<ul type="square">
|
|||
|
<li> 0 - East</li>
|
|||
|
<li> 90 - North</li>
|
|||
|
<li> 180 - West</li>
|
|||
|
<li> 270 - South </li>
|
|||
|
</ul>
|
|||
|
</blockquote>
|
|||
|
<ul type="square">
|
|||
|
<strong>Parms:</strong>
|
|||
|
<li> <strong>point</strong> (vector)<br>
|
|||
|
The xyz location of the oribiting point.<br>
|
|||
|
<br>
|
|||
|
</li>
|
|||
|
<li> <strong>center</strong> (vector)<br>
|
|||
|
The xyz location of the origin.</li>
|
|||
|
</ul>
|
|||
|
<p> <strong>vector globalMath_RotateAnglesInXYPlane( inputAngles, degrees
|
|||
|
)</strong></p>
|
|||
|
<blockquote>
|
|||
|
<p> <strong>Purpose:</strong><br>
|
|||
|
Takes the passed in angles facing and rotates the Y axis the desired
|
|||
|
number<br>
|
|||
|
of degrees.</p>
|
|||
|
<p><strong>Returns:</strong><br>
|
|||
|
Vector. The new angles after the Y axis rotation has been applied. </p>
|
|||
|
</blockquote>
|
|||
|
<ul type="square">
|
|||
|
<strong>Parms:</strong>
|
|||
|
<li> <strong>inputAngles</strong> (vector)<br>
|
|||
|
The starting angles to rotate.<br>
|
|||
|
<br>
|
|||
|
</li>
|
|||
|
<li> <strong>degrees</strong> (float)<br>
|
|||
|
The number of degrees to rotate the Y axis.</li>
|
|||
|
</ul>
|
|||
|
<p> <strong>vector globalMath_RotatePointInXYPlane( inputPoint, pivotPoint,
|
|||
|
degrees )</strong></p>
|
|||
|
<p> </p>
|
|||
|
<blockquote>
|
|||
|
<p> <strong>Purpose:</strong><br>
|
|||
|
Takes the passed in point and pivots it around a passed in pivot point
|
|||
|
in the XY plane.</p>
|
|||
|
<p><strong>Returns:</strong><br>
|
|||
|
vector, the new origin of the pivoted point.</p>
|
|||
|
</blockquote>
|
|||
|
<ul type="square">
|
|||
|
<strong>Parms:</strong>
|
|||
|
<li> <strong>inputPoint</strong> (vector)<br>
|
|||
|
The point to pivot,<br>
|
|||
|
<br>
|
|||
|
</li>
|
|||
|
<li> <strong>pivotPoint</strong> (vector)<br>
|
|||
|
The point to pivot around<br>
|
|||
|
<br>
|
|||
|
</li>
|
|||
|
<li> <strong>degrees</strong> (float)<br>
|
|||
|
The number of degrees to pivot the point.</li>
|
|||
|
</ul>
|
|||
|
<p> <strong>vector globalMath_MirrorAnglesInXYPlane( vector inputAngles,
|
|||
|
float degrees ) </strong></p>
|
|||
|
<blockquote>
|
|||
|
<p> <strong>Purpose:</strong><br>
|
|||
|
Takes the passed in angles facing and mirrors them in the XY plane.
|
|||
|
The mirroring line is determined by the passed in degrees. The main
|
|||
|
points are:</p>
|
|||
|
<ul type="square">
|
|||
|
<li>0 - East / West</li>
|
|||
|
<li> 90 - North South</li>
|
|||
|
<li> 180 - East / West</li>
|
|||
|
<li> 270 - North / South </li>
|
|||
|
</ul>
|
|||
|
<p>Anything above 179 degrees is redundant as in the actual direction
|
|||
|
of the line is irrelevant for this calculation.</p>
|
|||
|
<p><strong>Returns:</strong><br>
|
|||
|
Vector; the new mirrored angles facing.</p>
|
|||
|
</blockquote>
|
|||
|
<ul type="square">
|
|||
|
<strong>Parms:</strong>
|
|||
|
<li> <strong>inputAngles</strong> (vector)<br>
|
|||
|
The starting angles to mirror.<br>
|
|||
|
<br>
|
|||
|
</li>
|
|||
|
<li> <strong>degrees</strong> (float)<br>
|
|||
|
Determines how to place the mirroring line.</li>
|
|||
|
</ul>
|
|||
|
<p> <strong>vector globalMath_MirrorPointInXYPlane( inputPoint, pivotPoint,
|
|||
|
degrees )</strong></p>
|
|||
|
<blockquote>
|
|||
|
<p> <strong>Purpose:</strong><br>
|
|||
|
Takes the passed in point and mirrors it in the XY plane. The mirroring
|
|||
|
line is determined by the passed in degrees. The main points are:</p>
|
|||
|
<ul type="square">
|
|||
|
<li>0 - East / West</li>
|
|||
|
<li> 90 - North South</li>
|
|||
|
<li> 180 - East / West</li>
|
|||
|
<li> 270 - North / South </li>
|
|||
|
</ul>
|
|||
|
<p>Anything above 179 degrees is redundant as in the actual direction
|
|||
|
of the line is irrelevant for this calculation.</p>
|
|||
|
<p>The pivot point is used to determine where to place the mirror in the
|
|||
|
world. So the mirroring line will be drawn through the pivot point,
|
|||
|
and it's relative location to the point to be mirrored will be taken
|
|||
|
into account.</p>
|
|||
|
<p><strong>Returns:</strong><br>
|
|||
|
vector, the new origin of the mirrored point.</p>
|
|||
|
</blockquote>
|
|||
|
<ul type="square">
|
|||
|
<strong>Parms:</strong>
|
|||
|
<li> <strong>inputPoint</strong> (vector)<br>
|
|||
|
The point to mirror<br>
|
|||
|
. <br>
|
|||
|
</li>
|
|||
|
<li> <strong>pivotPoint</strong> (vector)<br>
|
|||
|
The point to mirror around.<br>
|
|||
|
<br>
|
|||
|
</li>
|
|||
|
<li> <strong>degrees</strong> (float)<br>
|
|||
|
Determines how to place the mirroring line.</li>
|
|||
|
</ul>
|
|||
|
<p> <strong>float globalMath_GetDistance( vecFrom, vecTo ) </strong></p>
|
|||
|
<blockquote>
|
|||
|
<p> <strong>Purpose:</strong><br>
|
|||
|
Calculates the distance in units between two given coordinates in 3
|
|||
|
dimensions.</p>
|
|||
|
<p><strong>Returns:</strong><br>
|
|||
|
Float. The distance in units between the two passed in coordinate points.</p>
|
|||
|
</blockquote>
|
|||
|
<ul type="square">
|
|||
|
<strong>Parms:</strong>
|
|||
|
<li> <strong>vecFrom</strong> (vector)<br>
|
|||
|
The xyz location of the starting point.<br>
|
|||
|
<br>
|
|||
|
</li>
|
|||
|
<li> <strong>vecTo</strong> (vector)<br>
|
|||
|
The xyz location of the ending point.</li>
|
|||
|
</ul>
|
|||
|
<p> <strong>float globalMath_GetXYDistance( vecFrom, vecTo )</strong></p>
|
|||
|
<blockquote>
|
|||
|
<p> <strong>Purpose:</strong><br>
|
|||
|
Calculates the distance in units between two given points only taking
|
|||
|
the X and Y coordinates into account. So it's returning a straight-line
|
|||
|
distance from a top-down (XY) only perspective (2 dimensions).</p>
|
|||
|
<p><strong>Returns:</strong><br>
|
|||
|
Float, the distance in units between the two passed in coordinate points.</p>
|
|||
|
</blockquote>
|
|||
|
<ul type="square">
|
|||
|
<strong>Parms:</strong>
|
|||
|
<li> <strong>vecFrom</strong> (vector)<br>
|
|||
|
The xyz location of the starting point.<br>
|
|||
|
<br>
|
|||
|
</li>
|
|||
|
<li> <strong>vecTo</strong> (vector), <br>
|
|||
|
The xyz location of the ending point.</li>
|
|||
|
</ul>
|
|||
|
<p> <strong>float globalMath_RampUp_GetMovementPercentage( float fltPercentageDone_Move
|
|||
|
)</strong></p>
|
|||
|
<blockquote>
|
|||
|
<p> <strong>Purpose:</strong><br>
|
|||
|
Based on a set Sin curve, takes the passed in percentage and converts
|
|||
|
it to a percentage based on a ramping up acceleration curve.</p>
|
|||
|
<p><strong>Returns:</strong><br>
|
|||
|
Float. The equivalent percentage value taking acceleration into account.
|
|||
|
</p>
|
|||
|
</blockquote>
|
|||
|
<ul type="square">
|
|||
|
<strong>Parms:</strong>
|
|||
|
<li> <strong>fltPercentageDone_Move</strong> (float)<br>
|
|||
|
The percentage to convert, from 0 - 1.</li>
|
|||
|
</ul>
|
|||
|
<p> <strong>float globalMath_RampDown_GetMovementPercentage( float fltPercentageDone_Move
|
|||
|
)</strong></p>
|
|||
|
<blockquote>
|
|||
|
<p> <strong>Purpose:</strong><br>
|
|||
|
Based on a set Sin curve, takes the passed in percentage and converts
|
|||
|
it to a<br>
|
|||
|
percentage based on a ramping down acceleration curve.</p>
|
|||
|
<p><strong>Returns:</strong><br>
|
|||
|
Float. The equivalent percentage value taking acceleration into account.</p>
|
|||
|
</blockquote>
|
|||
|
<ul type="square">
|
|||
|
<strong>Parms:</strong>
|
|||
|
<li> <strong>fltPercentageDone_Move</strong> (float)<br>
|
|||
|
The percentage to convert, from 0 - 1.</li>
|
|||
|
</ul>
|
|||
|
<p> <strong>float globalMath_RampUpDown_GetMovementPercentage( float fltPercentageDone_Move
|
|||
|
)</strong></p>
|
|||
|
<blockquote>
|
|||
|
<p> <strong>Purpose:</strong><br>
|
|||
|
Based on a set Sin curve, takes the passed in percentage and converts
|
|||
|
it to a percentage based on a ramping up, then back down acceleration
|
|||
|
curve.</p>
|
|||
|
<p><strong>Returns:</strong><br>
|
|||
|
Float. The equivalent percentage value taking acceleration into account</p>
|
|||
|
</blockquote>
|
|||
|
<ul type="square">
|
|||
|
<strong>Parms:</strong>
|
|||
|
<li> <strong>fltPercentageDone_Move</strong> (float)<br>
|
|||
|
The percentage to convert, passed value from 0 - 1.</li>
|
|||
|
</ul>
|
|||
|
<p> <strong>vector globalMath_LerpGetPosition( vector vecMove, float fltPercentageDone_Distance
|
|||
|
)</strong></p>
|
|||
|
<blockquote>
|
|||
|
<p> <strong>Purpose:</strong><br>
|
|||
|
Takes the passed in vector, and using that vector as the ending point
|
|||
|
in a line going from '0 0 0', returns a percentage of that distance.</p>
|
|||
|
<p><strong>Returns:</strong><br>
|
|||
|
Vector. The converted value based on the passed percentage.</p>
|
|||
|
</blockquote>
|
|||
|
<ul type="square">
|
|||
|
<strong>Parms:</strong>
|
|||
|
<li> <strong>vecMove</strong> (vector)<br>
|
|||
|
The value to consider as the ending point in a line from '0 0 0' for
|
|||
|
the conversion.</li>
|
|||
|
<li> <strong>fltPercentageDone_Distance</strong> (float)<br>
|
|||
|
The percentage of vecMove to return. Passed value from 0 - 1.</li>
|
|||
|
</ul>
|
|||
|
<p> <strong>float globalMath_LinearFalloff ( maxDistance, maxValue, _origin
|
|||
|
, location )</strong></p>
|
|||
|
<blockquote>
|
|||
|
<p><strong>Purpose:</strong><br>
|
|||
|
Provides a linear falloff from 0 to maxValue, based on the distance
|
|||
|
of location from origin, up to a maxDistance. Once maxDistance is exceeded,
|
|||
|
the value is clamped to maxValue.</p>
|
|||
|
<p><strong>Returns:</strong><br>
|
|||
|
Float. A value from 0 to maxValue, based on the distance of location
|
|||
|
from _origin, clamped to maxValue at maxDistance and greater.</p>
|
|||
|
</blockquote>
|
|||
|
<ul type="square">
|
|||
|
<strong>Parms:</strong>
|
|||
|
<li> <strong>maxDistance</strong> (float)<br>
|
|||
|
maxDistance - Maximum distance to use for interpolation. Any distance
|
|||
|
past maxDistance returns maxValue.</li>
|
|||
|
<li> <strong>maxValue</strong> (float)<br>
|
|||
|
Maximum allowed value, corresponds to being at exactly maxDistance from
|
|||
|
the origin.</li>
|
|||
|
<li> <strong>_origin</strong> (vector)<br>
|
|||
|
Center of the distance test. </li>
|
|||
|
<li> <strong>location</strong> (vector)<br>
|
|||
|
Location of the value being tested in space. Used to calculate a distance
|
|||
|
from _origin.</li>
|
|||
|
</ul>
|
|||
|
<p> </p></td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td colspan="3"><img src="../images/footer.jpg" width="702" height="36" border="0" usemap="#Map"><br>
|
|||
|
<img src="../images/hor_line.jpg" width="702" height="1"></td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td colspan="3" class="legal"><table width="100%" border="0" cellspacing="0" cellpadding="4">
|
|||
|
<tr>
|
|||
|
<td class="legal"> Copyright ©2003 Ritual Entertainment, Inc. All rights reserved.<br>
|
|||
|
Please do not email Ritual Entertainment with questions about the
|
|||
|
UberTools Game Development Kit. It is provided as is and is not supported by Ritual Entertainment.</td>
|
|||
|
<td><a href="http://www.ritual.com/tech/overview.html" target="_blank"><img src="../images/uber_logo.jpg" width="43" height="56" hspace="4" border="0"></a></td>
|
|||
|
<td><a href="http://www.ritual.com" target="_blank"><img src="../images/ritual_logo.jpg" width="100" height="56" hspace="4" border="0"></a></td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
<p align="center"> </p></td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
<map name="Map">
|
|||
|
<area shape="rect" coords="601,10,693,28" href="#top">
|
|||
|
</map>
|
|||
|
</body>
|
|||
|
</html>
|