This project is read-only.

GoblinXNA and MataliPhysics

Jun 15, 2012 at 9:00 AM

HI Ohan,

I've been figuring out last two days on how to use MataliPhysics inside GoblinXNA. My assumption is that to make it possible MataliPhysics code should be using the IPhysics interface. I end up to be so frustrated because I don't find any ways to integrate that. I think MataliPhysics could be the best physics engine to be used with GoblinXNA. It is managed and the forum is so active.

Somehow today I found your source code which use MataliPhysics and it is already ready to be used with GoblinXNA. I've checked back the manual, installation guide and also the API documentation there are no evidence of MataliPhysics at all.

How am I going to use MataliPhysics for my project? pls help

Jun 15, 2012 at 9:44 AM

In which source code do you see MataliPhysics in the current release?

And, yes, we do support MataliPhysics in our internal version of Goblin XNA since we have several projects on Windows Phone 7.5, and MataliPhysics is the only option for the phone. However, we haven't released MataliPhysics to the public yet since we haven't released the Windows Phone support for Goblin XNA due to the lack of license-compatible tracking library written in C#. 

We may release the WinPhone support in our next release without any tracking capability, and in that case, we'll release MataliPhysics support as well. The next release is expected to come out by the end of June with ALVARWrapper 2.0 support.


Jun 15, 2012 at 10:01 AM
ohanoda wrote:

In which source code do you see MataliPhysics in the current release?

i've found it here

anyway thanks for the explanation

Jun 16, 2012 at 4:00 AM

I see, ya, I left the windows phone version of the tutorial there. In any case, we hope to release it soon.


Jun 27, 2012 at 9:22 AM

It's been released

Jul 2, 2012 at 2:30 AM
ohanoda wrote:

It's been released

cheers! thank you so much...hope this will speed up my development

Jul 2, 2012 at 4:44 AM

I've followed the installation manual and tried to run Tutorial 5. I got an error saying " the type of namespace name 'Matali' does not exist......(are you missing an assembly reference?)"

I double checked and everything was according to the installation manual. I've even add the .dll file to the project path (i knew it is not going to solve but just a try). Add the file as reference is no use either. I'm currently on Matali however the current download is 1.9. Is there something missing?

Jul 2, 2012 at 7:55 PM

You should read the installation guide very carefully. See the bold sentence below.


(Needed if you want to use MataliPhysics) Download MataliPhysics 1.8 from After installed, copy MataliPhysics.dll from Komires\MataliPhysics\MataliPhysicsXNA\MataliPhysics\x86 (the directory where you installed the Matali SDK) to the GoblinXNAv4.1\dlls\managed\ directory. Finally, add MataliCloth.cs, MataliObject.cs, MataliPhysics.cs, and MataliVehicle.cs classes to your project under Physics.Matali (this directory will automatically show if you add these classes as link) and recompile GoblinXNA. NOTE: To run Tutorial 5 with Matali instead of Newton, uncomment USE_MATALI macro on line 36 of Tutorial5.cs file.



Jul 2, 2012 at 7:56 PM

You need to add those classes to the Goblin XNA project and recompile it.


Jul 3, 2012 at 3:37 PM

been thought about it but didn't managed to try it. thanks a lot. gonna nail it tonite

Jul 4, 2012 at 3:06 AM

I managed to compile GoblinXNA without any problems. However Tutorial5 is still giving me the same error after uncomment the USE_MATALI line 36.

According to the installation guide the compiled GoblinXNA.dll will be under GoblinXNA/bin but I noticed that mine it resides under GoblinXNA/bin/X86. therefore I copied it to GoblinXNA/bin. nothing happened nevertheless. :(


Jul 4, 2012 at 3:17 AM
Edited Jul 4, 2012 at 3:18 AM

Previously I have two errors

at line 56 Tutorial5

using GoblinXNA.Physics.Matali;

and at line 125

scene.PhysicsEngine = new MataliPhysics();

after adding in the newly compiled GoblinXNA in the reference the error on line 125 is gone. but intellisense still cannot bring out Matali at line 56

Jul 5, 2012 at 12:32 AM

is it could be due to that I am using MataliPhysics V1.9 instead of V1.8? Please help

Jul 5, 2012 at 1:11 AM

Please follow the installation manual including the version. We cannot guarantee it will compile correctly if you download different version since they may change APIs. Also, it doesn't make sense that MataliPhysics class is recognized, but GoblinXNA.Physics.Matal is not recognized. My guess is that you didn't add Matali classes in Goblin XNA as links, but added directly. Please read the manual again carefully.


Jul 6, 2012 at 9:30 AM

managed to get back the version 1.8. and finally thanks for your help....what a relief :)

Jul 13, 2012 at 8:55 AM

Now I am trying to combine two objects using the CreateConstraint, but I am not able to achieve that. In the documentation it states like this

Create a constraint between two existing physical objects.

The constraints are not actually added at this stage, but in the Update method

what do you mean by this?