Binding issues

Irrlicht.Net is no longer developed or supported, Irrlicht.Net Cross Platform is a much more complete wrapper. Please ask your C# related questions on their forums first.
Locked
Foole
Posts: 87
Joined: Mon Aug 29, 2005 10:08 am

Binding issues

Post by Foole »

First i'd like to say this is the best 3d engine i've found for .NET. I was amazed how easy it was to get things working. I really appreciate the work you guys have put into it.

I've found a couple of problems with the way some parts have been wrapped.

The 2 paramaters marked as 'out' for ISceneCollisionManager.GetCollisionResultPosition do not register as being 'out' parameters in C#. I think this is because they need to references.
ie instead of:

Code: Select all

		[PARAMFLAG::Out] Core::Triangle3D triout,
		[PARAMFLAG::Out] bool outFalling,
it sohuld be:

Code: Select all

		[PARAMFLAG::Out] Core::Triangle3D& triout,
		[PARAMFLAG::Out] bool& outFalling,
I don't know C++.NET at all, so i'm not sure if that is correct.

The reason this is an issue for me is that I want to know when my characters start and stop falling so I can do falling damage calculations and possibly show a 'falling' animation. I would like to do this by writing my own animator.

Secondly, C# doesn't seem to like the way some operators are declared. The main one that is not working for me is the addition operator for Vector3D. I'm surprised no one else has mentioned this. Am I the only one?

I've got a list of feature requests and suggestions.. is this the right forum to post them to? Should I post the stuff above into the bugs forum?


Foole
Foole
Posts: 87
Joined: Mon Aug 29, 2005 10:08 am

Post by Foole »

I've had a go at fixing this myself and it looks like the correct code is:

Code: Select all

		[PARAMFLAG::Out] Core::Triangle3D& triout,
		[Out] System::Boolean* outFalling,
I then added a * to start of the line that reads "outFalling = outF;".

This compiles and runs ok, but the outFalling seems to be True at times when my character is not actually falling. It doesn't appear to be a marshalling problem because outF == 1 when this happens. I'm gonna do some more research on this.

Changing the declaration of op_Addition in Vector3D.h to this:

Code: Select all

static Vector3D op_Addition(Vector3D o1, Vector3D o2)
fixed my other problem.
Locked