I compiled box2d in a CLR Library project( and it did work ), then i reference this project in C#( as shown in the first block of code). So by now I can declare these objects. But when I want to set the values of members of these classes, I cannot get access to them! I think it is possibly because of using unmanaged code in managed code, but how can I fix this?
///inside a function of game class( C# ) unsafe { b2Body* body; b2BodyDef def; //these four methods are the only ones shown by IntelliSense while def has many more methods def.Equals GetHashCode GetType ToString } ///box2d header file public class b2Body { public: b2Fixture* CreateFixture(const b2FixtureDef* def); b2Fixture* CreateFixture(const b2Shape* shape, float32 density); //other public functions and memebers... public struct b2BodyDef { b2BodyType type; b2Vec2 position; float32 angle; b2Vec2 linearVelocity; float32 angularVelocity; float32 linearDamping; //other members... };