1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- Created by texi2html 1.64 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
Olaf Bachmann <obachman@mathematik.uni-kl.de>
and many others.
Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
-->
<HTML>
<HEAD>
<TITLE>Crystal Space: csPhyziks Usage Guide</TITLE>
<META NAME="description" CONTENT="Crystal Space: csPhyziks Usage Guide">
<META NAME="keywords" CONTENT="Crystal Space: csPhyziks Usage Guide">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="texi2html 1.64">
</HEAD>
<BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
<A NAME="SEC336"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_157.html#SEC335"> < </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_159.html#SEC338"> > </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_143.html#SEC311"> << </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_149.html#SEC326"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_159.html#SEC338"> >> </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="index.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_285.html#SEC711">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<HR SIZE=1>
<H3> 6.7.9 Usage Guide </H3>
<!--docid::SEC336::-->
<P>
The way you use this physics module in your application is very application
specific. Since games are the most common type of application this section
will mostly cover recommended usage for games.
</P><P>
If your game is a space-ship type game, I would recommend putting all your
game objects under primary control of the physics engine. Thrown in some
gravity wells for planets, subclass `<SAMP>ctForce</SAMP>' to create your rocket
engine, add a rigid body for each game object, apply impulses when something
gets hit and things should work out well for you.
</P><P>
If your game has animated models running around and blowing each other up or
running obstacle courses, you probably do <EM>not</EM> want to put everything
under control of the physics module. I would recommend using the physics
module for special effects and appropriate game-play objects. For instance,
attach a tail to your character as an articulated body, use rigid bodies for
gibbs or explosion debris, have an articulated body for your characters that
only gets activated when you want them to act like a rag-doll, use articulated
bodies for ropes that your char can swing on, trees that sway in the wind,
etc.
</P><P>
I would recommend using several <CODE>ctWorld</CODE>'s that isolate distinct element
from each other, so that during a catastrophe time-slicing search your whole
simulation doesn't bog down. For instance, have one `<SAMP>ctWorld</SAMP>' for all
your debris and body parts, if you have a tail on your main character add that
as an articulated body to its own `<SAMP>ctWorld</SAMP>'.
</P><P>
<A NAME="SEC337"></A>
<H4> Caveats </H4>
<!--docid::SEC337::-->
<P>
This module is a tool, and used properly, could really enhance the reality of
your game worlds. You need to control and interpret the results to make sure
they make sense and are consistent with your games behavior.
</P><P>
At the time of writing, continuous contact with the ground is only partial
implemented (the solver exists). This is a pretty important feature, and its
absence limits what you can do with this module. However the main tools;
impulse response (rigid body and articulated body), grounded articulated
bodies and `<SAMP>ctKinematicEntity</SAMP>' attached articulated bodies. These
features are sufficient for many nifty dynamically controlled elements.
<A NAME="Plug-In Drivers"></A>
<HR SIZE=1>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_157.html#SEC335"> < </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_159.html#SEC338"> > </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_143.html#SEC311"> << </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_149.html#SEC326"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_159.html#SEC338"> >> </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="index.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_285.html#SEC711">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<BR>
<FONT SIZE="-1">
This document was generated
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>
</BODY>
</HTML>
|