Jump to content

Problem in using "Shape" objects -"object reference not set to an instance" run time exception is occuring


photo

Recommended Posts

Posted

Hi,

 

  I 'm using UNiGiNE 2.2.1. I am trying to create a sphere object of 200 mass  in C#. But I 'm getting "object reference not set to instance of an object "  RUN TIME Exception. I'm writing a part of code here. 

 

 1.   ObjectMeshStatic mesh = new ObjectMeshStatic("/samples/players/meshes/sphere_00.mesh");

 2.   mesh.setMaterial("players_red", "*");

 3.   mesh.setProperty("surface_base", "*"); 

 4.   Body body     =  new BodyRigid(mesh, 0.5f);

 5.   Shape shape =  new ShapeSphere(body, 0.5f);

 6.   shape.setMass(200.0f);

 

In the above  C# code, i'm getting exception at 6th line. If I comment that line, my program is running fine but not i'm expecting.  So please tell me why the exception is coming.

 

Thanks.

 P.S  Same kind of exception is coming with JointSuspension as well. 

Posted

Hi Binuraj,

 

Unfortunately, this is known issue for now. We are already fixed this bug in our internal builds. Bug fix will be available with 2.3 SDK update.

 

In the meantime you will have to use UnigineScript function for such purposes.

 

Sorry for the inconvenience caused.

How to submit a good bug report
---
FTP server for test scenes and user uploads:

×
×
  • Create New...