Game Development Community

Physics Not Working

by Luke Hopkins · in Game Mechanics Kit · 08/10/2009 (9:17 am) · 6 replies

Hi, i recently just brought this pack. Everything else works great. I complied with ODE and Bullet now nether of them seem to work. There are no errors when compling. Nothing in console log. I had a look though the guide a few times now and there seems to be nothing i have missed out, but i must of since when orcs are killed theres no rag doll and no objects have physics.

I've changed my physics.cs to ODE when complied with ODE, ive added my libs.

Has any experienced this problem. Also when i first complied the screen was yellow and then pink in the editor so i copied some demo files over and works fine apart from Physics.

Woundering if anyone could help me please. Thanks

#1
08/10/2009 (10:33 am)
Hi Luke,

I recently had some problems adding Bullet Physics to GMK. One thing may be to check what you did for step 2 in the programmers guide (in the "Installation of Physics Pack" section).

When you navigate to "Project Properties->Linker->General->Additional Library Directories" inside your solution file, make sure that the file path reads like the following:

"../../../../../engine/lib/bullet/lib"

and NOT "C:bla bla bla bla/bullet/lib".

The above path won't give you a compilation error or any warnings for that matter, but will cause crashes when you add physics objects etc.

For some reason, when you use the "..." button in the editor, it retains the file path. I had to copy/paste the ".../.../.../..." part of the text from an existing entry. Check for this and other instances in your solution file.

Also... there are some problems with certain build versions of Bullet with some PC systems apparently (its mentioned in the docs somewhere)... you could try moving to an older/newer version of the Bullet installation (if you are using the 1.2.1 version of GMK, the older version is included in a seperate folder).


Cheers,

Rich H.
#2
08/10/2009 (6:34 pm)
Thanks For the adivce but it still not working after trying those things. Im really stumped. Do you know what physics engine they use for the demo
#3
08/10/2009 (7:14 pm)
Ok i finally got my console to give out a clue as to why im having this error and it says

scriptsAndAssets/server/scripts/logickingMechanics/sampleObjects/ragDollsODE.cs (0): preload failed for ElfRagDoll: ShapeBaseData: Couldn't load shape "scriptsAndAssets/data/shapes/players/elf/Elf.dts".

and this course the game to stop loading in datablocks, so its called for files for the level but there not linking.
#4
08/11/2009 (2:52 am)
thats weird,
I get that in console all the time, and the same for the ork,
but it always loads and plays.
useing bullet, I am, not physx (waaaay faster)

do a rebuild, and see what warnings you are getting in the compiler
#5
08/11/2009 (9:50 am)
@Luke Hopkins
What version of the engine you are using?



There has to be Elf in TGEA versions.
scriptsAndAssets/data/shapes/players/elf/Elf.dts

Any luck of activating physics? Rigid bodies don't move?

Have you added files bullet or ODE CPP files into the project?

Also please check
T3D\logickingMechanics\physics\physics.h

You have to uncomment one of defines to actually compile physics files.
//#define PHYSICS_BULLET
//#define PHYSICS_ODE
#6
08/11/2009 (10:28 am)
I started the intergration all over again and did it in 1.8.1 and used bullet 2.75 and everything works great now. It was something to do with my lib files dunno what though.

Cheers for the comments and help thou

Luke