Crystal Space
Welcome, Guest. Please login or register.
August 20, 2014, 06:04:15 am

Login with username, password and session length
Search:     Advanced search
9008 Posts in 2046 Topics by 8327 Members
Latest Member: Jacquelynsims
* Home Help Search Login Register
  Show Posts
Pages: [1]
1  Associate Projects / CEL Discussion / Re: celstart xml beahviour layer: cannot move entity on: January 29, 2009, 12:27:11 pm
i have solved it! (thanks to jorrit)

I had to use
Code:
<default propclass="?pcmech" />
<action id="actid(SetPosition)">
    <par id="parid(position)" value="[0,0,0]" />
</action>
instead of:
Code:
<default propclass="?pcmech" />
<expr eval="SetPositon{position=[0,0,0]}" />
to move the mesh with mechanics

now it works
2  Associate Projects / CEL Discussion / [solved] celstart xml beahviour layer: cannot move entity on: January 29, 2009, 11:13:27 am
Hi there,
I have a problem that makes me crazy!! I just want to move a entity in my celstart app (written in xml) and don't get it to move! I use the physic layer (pcmechobject) for my entity. Its no problem to give duration on my model with the pcmechobject propertyclass, but setting the position to fix coords (i.e. 0,0,0) seems impossible.

Here a minimal example of my problem:
Code:
<addon plugin="cel.addons.celentity" entityname="camera">
<propclass name="pcmechsys">
            <action name="QuickStep" />
            <action name="SetStepTime">
        <par name="time" float="0.02" />
            </action>
        </propclass>

<propclass name="pccommandinput">
                     .
                     .
                     .
</propclass>

<propclass name="pcdefaultcamera">
    <action name="SetCamera">
    <par name="modename" string="freelook" />
    <par name="spring" vector="3.5,0.25,0.01" />
    <par name="distance" vector="2,8,16" />
    <par name="fpoffset" vector="0,1,0" />
    <par name="tpoffset" vector="0,1,3" />
    </action>
</propclass>

<propclass name="pcmesh">
    <action name="LoadMesh">
    <par name="factoryname" string="hamster" />
    </action>
           <action name="MoveMesh">
      <par name="sector" string="room" />
      <par name="position" vector="0,2,0" />
          </action>
</propclass>

<propclass name="pcmechobject">
<action name="SetColliderMesh">
<par name="factoryname" string="hamster" />
<par name="offset" vector="0.0,0.0,0.0" />
</action>
</propclass>

<behaviour name="shooter" />
<call event="init" />
</addon>
 
 
<addon plugin="cel.addons.xmlscripts">
<script name="shooter">
<event name="init">
                     <var name="pcmesh" value="pc(pcmesh)" />
                     <var name="pcmech" value="pc(pcmechobject)" />
</event>
                     .
                     .
                     .
<event name="shootEm">
<call event="calcShoot" />  <!-- Here x, y and z are calculated -->
<default propclass="?pcmech" />
<expr eval="AddForceDuration{force=[?x,?y,?z],relative=false,position=[-0.00000001,0,0.0000001],seconds=.2}" />
</event>
<event name="pccommandinput_restart1">
<default propclass="?pcmesh" />
<expr eval="MoveMesh{sector='room',position=[0,0,0]}" />
</event>
</script>
</addon>

Here is the runable celzip of my project (5,3MB):
http://knecht.homelinux.net/ftp/ftp2/knecht/hamsterRev.celzip
shoot the hamster with space, reset the scene with left CTRL (it does not change position back, that is my problem), and control the durationForce with cursorkeys (up,down = power, left/right=direction, w/s keys for the angle)


To run AddForceDuration on pcmechobject works, but there is no MoveMesh or SetPosition in that property class. I tried to work with pcmesh and MoveMesh (see my code), i tried to use pcmove.linear with SetPosition (there is no documentation, i tried to read the parameter names from cel api documentation) or MoveMesh, and tried a few other things, but my modell is not moving!! There are no errors on console, but also no effect in my game.

The game is to shoot a hamster out of a cage, and i want to reset the hamster to startposition, but i don't know how!
How can i just set the position of my model to an absolut position?

It seems that this post is about an similar problem:
http://www.crystalspace3d.org/forum/index.php/topic,906.msg4286.html#msg4286

I also ask in the irc chat (#crystalspace) and search for an solution. All they told me is: "use pcmechobject, use pcmesh, use pcmove.linear", but i can't figure it out. Has someone ever moved an entity from xml behaviour scripts? If yes, HOW? AddForceDuration is no problem and works, but to set the position i found no documentation and no examples.

Any suggestions ?

Thanks
Sebastian
3  Associate Projects / CEL Discussion / Re: CEL compiling problems... Again... on: January 29, 2009, 10:13:59 am
i wrote a script that tests the environment and downloads/compiles cel with ode.

Maybe that helps you:
http://www.crystalspace3d.org/forum/index.php/topic,1745.msg8145.html#msg8145
4  Associate Projects / CEL Discussion / Re: CEL 'Building and Installing' documentation incomplete? on: January 29, 2009, 10:11:01 am
For building on linux i have wrote a shellscript doing all needed steps to get CEL, CrystalSpace and ODE compiled and running together.

I also make a HowTo (in german) what is to do. You can find the howto and the script here: (newest script is linked at the bottom of the thread, named compile_cel_with_ode.sh)
>> CEL mit ODE Physik Layer (neoberserker.de) <<

The useage of the script is descripted in the howto (in german). Here a quickstart:
Code:
mkdir /opt/crystalSpace
cd /opt/crystalSpace
[ put the script there and make it runable ]
./compile_cel_with_ode.sh all
[ if all needed tools (automake, svn, jam) are found on the system the script starts to download all sources, unpack them, configure them and compile them. If system tools are missed a messaged is displayed on the console. If compiling is done it creates a startPhysicDemo.sh script and downloads the physicsdemo.celzip. Run it and see if it runs.]

Hope that helps someone, my study group liked it.

And please tell me when there are problems with the script! Notice that configure and compile logs are created in the folder the script is in!
5  Crystal Space Development / Support / [solved] Re: Compile ode, crystalSpace and CEL problem on: December 13, 2008, 11:41:11 pm
one problem was that i have used the trunk version, not version 0.8.

Now i checkout ode with:
Code:
svn co https://opende.svn.sourceforge.net/svnroot/opende/tags/0.8 opende

And then there is no problem with compiling crystalspace with ode. From the compile log:
Code:
MkDir1 ./out/linux/optimize/plugins/physics/odedynam
C++ ./out/linux/optimize/plugins/physics/odedynam/odedynam.o
.
.
.
LinkPlugin odedynam.so
ObjTagMetaData odedynam.so
SplitDebugInfo1 odedynam.so

After compile there is a odedynam.so in crystalspace folder. Therefore i think crystalspace with ode is ok now.

6  Crystal Space Development / Support / Re: Compile ode, crystalSpace and CEL problem on: December 13, 2008, 08:15:56 pm
when compiling crystalspace with jam i found the following error:
Code:
LinkPlugin odedynam.so
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/local/lib/libode.a(box.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libode.a: could not read symbols: Bad value
collect2: ld gab 1 als Ende-Status zurück

    g++ -Wl,--as-needed -o odedynam.so ./out/linux/optimize/plugins/physics/odedynam/odedynam.o  -lm -ldl -lnsl -L/usr/local/lib -Wl,-z,defs -Wl,--warn-unresolved-symbols -g2 -shared ./out/linux/optimize/libs/libcrystalspace-1.2.a -lpthread -lz -L/usr/local/lib -lode -lm -ldl -lnsl -L/usr/local/lib -Wl,-z,defs -Wl,--warn-unresolved-symbols -g2 \
      -Wl,-soname,odedynam.so
 
...failed LinkPlugin odedynam.so ...

there is no build error with ode, just some warnings:
Code:
MkDir1 ./out/linux/optimize/plugins/physics/odedynam
C++ ./out/linux/optimize/plugins/physics/odedynam/odedynam.o
plugins/physics/odedynam/odedynam.h:108: Warnung: »struct CS::Plugin::odedynam::ColliderContainer« hat virtuelle Funktionen aber nicht-virtuellen Destruktor
plugins/physics/odedynam/odedynam.cpp: In member function »void CS::Plugin::odedynam::csODECollider::AddMassToBody(bool)«:
plugins/physics/odedynam/odedynam.cpp:966: Warnung: »dMassSetCappedCylinder« ist veraltet (deklariert bei /usr/local/include/ode/mass.h:84)
plugins/physics/odedynam/odedynam.cpp:966: Warnung: »dMassSetCappedCylinder« ist veraltet (deklariert bei /usr/local/include/ode/mass.h:84)
plugins/physics/odedynam/odedynam.cpp: In member function »virtual bool CS::Plugin::odedynam::csODECollider::CreateMeshGeometry(iMeshWrapper*)«:
plugins/physics/odedynam/odedynam.cpp:1046: Warnung: »__comp_ctor « ist veraltet (deklariert bei ./include/csgeom/trimesh.h:292)
plugins/physics/odedynam/odedynam.cpp: In member function »virtual csOrthoTransform CS::Plugin::odedynam::csODEJoint::GetTransform()«:
plugins/physics/odedynam/odedynam.cpp:2485: Warnung: Aufzählungswert »CS_ODE_JOINT_TYPE_UNKNOWN« wird nicht von switch behandelt
plugins/physics/odedynam/odedynam.cpp:2485: Warnung: Aufzählungswert »CS_ODE_JOINT_TYPE_SLIDER« wird nicht von switch behandelt
plugins/physics/odedynam/odedynam.cpp:2485: Warnung: Aufzählungswert »CS_ODE_JOINT_TYPE_CONTACT« wird nicht von switch behandelt
plugins/physics/odedynam/odedynam.cpp:2485: Warnung: Aufzählungswert »CS_ODE_JOINT_TYPE_FIXED« wird nicht von switch behandelt
plugins/physics/odedynam/odedynam.cpp:2485: Warnung: Aufzählungswert »CS_ODE_JOINT_TYPE_AMOTOR« wird nicht von switch behandelt
plugins/physics/odedynam/odedynam.cpp: In member function »virtual ODEJointType CS::Plugin::odedynam::csODEJoint::GetType()«:
plugins/physics/odedynam/odedynam.cpp:2831: Warnung: Aufzählungswert »dJointTypeNone« wird nicht von switch behandelt
plugins/physics/odedynam/odedynam.cpp:2831: Warnung: Aufzählungswert »dJointTypeNull« wird nicht von switch behandelt
plugins/physics/odedynam/odedynam.cpp:2831: Warnung: Aufzählungswert »dJointTypeLMotor« wird nicht von switch behandelt
plugins/physics/odedynam/odedynam.cpp:2831: Warnung: Aufzählungswert »dJointTypePlane2D« wird nicht von switch behandelt
plugins/physics/odedynam/odedynam.cpp:2831: Warnung: Aufzählungswert »dJointTypePR« wird nicht von switch behandelt
plugins/physics/odedynam/odedynam.cpp:2831: Warnung: Aufzählungswert »dJointTypePU« wird nicht von switch behandelt
plugins/physics/odedynam/odedynam.cpp:2831: Warnung: Aufzählungswert »dJointTypePiston« wird nicht von switch behandelt

what does the link error means ?
7  Crystal Space Development / Support / Compile ode, crystalSpace and CEL problem on: December 13, 2008, 02:08:43 pm
Hi,

i want to compile crystalSpace and CEL with ODE support. I want to develop a game with physics for study. I work on a gentoo linux, build-environment automake and jam is installed.


That is what i have done:

get ode source, version 0.8
Code:
svn co https://opende.svn.sourceforge.net/svnroot/opende/trunk opende

i downloaded crystalspace-src-1.2.1 and cel-src-1.2.1.

first configure and compile ODE
Code:
sh autogen.sh
./configure  --with-trimesh=opcode
make -j4
make install
all done, no problem

second, configure and compile crystalspace
Code:
./configure --with-ode="/opt/ode/opende"

from the configuration output:
Quote
.
.
.
checking for ode-config... ode-config
checking for libode... yes
checking if libode is built with OPCODE support... yes
checking if libode is sufficiently recent... yes
.
.
.

then compiled it
Code:
jam -j4
everythings works without problems


third: Compile CEL
Code:
export CRYSTAL="/opt/cs_src"
./configure
jam -j4

It compiles, everything seems fine. I can start demos with celstart (i.e. celdemo.celzip, shadertest.celzip), but when i want to start the physicsdemo.celzip i got the error that ode is not found.
Code:
crystalspace.pluginmgr.loadplugin:
  could not load plugin 'crystalspace.dynamics.ode'

i found no tutorial or wiki entry that shows how i had to build ode, crystalspace and cel together. Only in README and INSTALL files there was sometimes a hint.

Can someone help me ? Don't know what is going wrong . . . any suggestions ?

thanks
Sebastian
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 6.139 seconds with 17 queries.