OpenID is an Internet-wide identity system that allows you to sign in to many websites with a single account.
With OpenID, your ID becomes a URL (e.g. http://username.myopenid.com/). You can get a free OpenID for example from myopenid.com.
For more information visit the official OpenID site.
45 Posts in 15 Topics by 16 members
Jump to:If this is your first visit, you will need to register before you can post. However, you can browse all messages below.
| Page: 1 | go to end | Reply |
| Author | Topic: how to get actors | 128 views |
25 February 2010 at 8:20pm
Hi,
i'm trying to create a game with XNA and PhysX-sharp.
My problem is: actors are always null.
the scene itself is initialized correctly (i guess so, there were no errors), but i can't create actors with scene.createActor(actordescription), it always returns null. actordescription.IsValid returns true.
I'm using XNA 3.1 (doesn't matter, or does it?), PhysX-Sharp 0.9.3, got the latest PhysX-Driver and PhysX-SDK 2.8.1.
Hope anybody can help.
Code:
//global
Nx.scene
//initialize
Nx.NxPhysicsSDKDesc sdkdesc = new Nx.NxPhysicsSDKDesc();
Nx.NxSDKCreateError err = Nx.NxSDKCreateError.NXCE_NO_ERROR;
sdk = Nx.PhysXLoader.NxCreatePhysicsSDK(Nx.PhysXLoader.NX_PHYSICS_SDK_VERSION, sdkdesc, ref err);
Nx.NxSceneDesc sceneDesc = new Nx.NxSceneDesc();
scene = sdk.createScene(sceneDesc);
//procedure: NxActor CreateBox(Matrix world, Vector3 dim, float mass)
Nx.NxBoxShapeDesc boxDesc = new Nx.NxBoxShapeDesc();
boxDesc.dimensions = swapper.CreateNxVector(dim); //swapper is a little swapper for XNA-Vectors and matrices and physx
Nx.NxActorDesc actorDesc = new Nx.NxActorDesc();
Nx.NxBodyDesc bodyDesc = new Nx.NxBodyDesc();
bodyDesc.mass = mass;
actorDesc.body = bodyDesc;
actorDesc.density = 10.0f;
actorDesc.globalPose = swapper.CreateNxMat34(world);
actorDesc.shapes.pushBack(boxDesc);
if (!actorDesc.isValid())
throw new Exception("Invalid Box"); //never thrown
return scene.createActor(actorDesc);
1 March 2010 at 9:29pm
very well visited forum, i see...
| 128 views | ||
| go to top | Reply |