kdr35
13-01-2011 21:17:50
I asked the problem the related forum thread with PhysX Candy Wrapper.( viewtopic.php?f=8&t=13111&start=45) Unfortunately i havent got any answer so far. Maybe anyone can answer the question on that thread , sorry question-repetition. it is important for me.
I am new in physx + mogre. I want to create a flag application in mogre + nvidia physx. I found one example in ogre (http://www.ogre3d.org/addonforums/viewtopic.php?t=5888&f=6#p78093) , i try to convert ogre code to mogre code. I largely completed conversion but i have some problems about conversion. I didnt found properties of some class and didnt create a new cloth. While creating cloth , I have null exception.
Does mogre physx wrapper support Cloth property of Nvidia Physx Wrapper?
http://www.ogre3d.org/addonforums/viewtopic.php?t=5888&f=6#p78093 orginal code in ogre forum.
I have converted to mogre code:
I am new in physx + mogre. I want to create a flag application in mogre + nvidia physx. I found one example in ogre (http://www.ogre3d.org/addonforums/viewtopic.php?t=5888&f=6#p78093) , i try to convert ogre code to mogre code. I largely completed conversion but i have some problems about conversion. I didnt found properties of some class and didnt create a new cloth. While creating cloth , I have null exception.
Does mogre physx wrapper support Cloth property of Nvidia Physx Wrapper?
http://www.ogre3d.org/addonforums/viewtopic.php?t=5888&f=6#p78093 orginal code in ogre forum.
I have converted to mogre code:
CapsuleShapeDesc csd = new CapsuleShapeDesc(0.2f,12f);
csd.LocalPosition = new Vector3(0, -0.2f, 0);
csd.Density = 0;
PhysX.ActorDesc flagPoleDsc = new ActorDesc(csd);
flagPoleDsc.Density = 0;
PhysX.Actor flagPole = phscene.CreateActor(flagPoleDsc);
PhysX.ClothDesc cp = new ClothDesc();
cp.SetToDefault();
cp.Thickness = 0.2f;
cp.BendingStiffness = 0.5f;
cp.Friction = 0.25f;
cp.Flags |= PhysX.ClothFlags.Bending;
cp.Flags |= PhysX.ClothFlags.CollisionTwoway;
cp.Flags |= PhysX.ClothFlags.Visualization;
cp.Flags |= PhysX.ClothFlags.Hardware;
cp.WindAcceleration = new Vector3(-20, 12, -1);
cp.Density = 0.15f;
// cp.meshMaterial = "nx.flag"; //i dont find equivalent value in mogre.
// cp.height = 8; //i dont find equivalent value in mogre.
// cp.width = 0.15f; //i dont find equivalent value in mogre.
PhysX.Cloth flag = phscene.CreateCloth(cp); // I DONT CREATE A CLOTH. WHILE CRETING CLOTH , HANDLE NULL EXEPTION.
flag.AttachToShape(flagPole.Shapes[0], PhysX.ClothAttachmentFlags.Twoway);