Sign in to follow this  
Daglamier

Physx error

Recommended Posts

Ok finaly got the physx sdk downloaded and installed, but having problems. Everything is fine until this is called: m_pScene = m_pPhysicsSDK->createScene(sceneDesc); This function always returns 0 no matter what, very confused... I would appreciate any help please, thanks Dag

Share this post


Link to post
Share on other sites
Is your m_pPhysicsSDK valid?

i.e. have you successfully called NxCreatePhysicsSDK before trying to create your m_pScene.

Is your sceneDesc != null?

As RDragon1 pointed out, you haven't given us a lot to go on.

Regards,
ViLiO

Share this post


Link to post
Share on other sites
Sorry, here we go:


m_pPhysicsSDK = NxCreatePhysicsSDK(NX_PHYSICS_SDK_VERSION);
assert(m_pPhysicsSDK && "We expect m_pPhysicsSDK to not be NULL at this point");
if( !m_pPhysicsSDK )
return false;

m_pPhysicsSDK->setParameter(NX_MIN_SEPARATION_FOR_PENALTY, -0.05f);

// Create a scene
NxSceneDesc sceneDesc;
sceneDesc.gravity = m_DefaultGravity;
sceneDesc.broadPhase = NX_BROADPHASE_COHERENT;
sceneDesc.collisionDetection = true;
sceneDesc.userContactReport = &m_ContactReport;

m_pScene = m_pPhysicsSDK->createScene(sceneDesc);
if( !m_pScene )
return false;



m_pPhysicsSDK seems to be correctly initialized but m_pScene is always 0.

I have tried to zero out nxscenedesc before using it and that wasn't the problem and I have moved the needed dll files in to the working directory.

Main problem is that the documentation doesn't even mention why the function would fail or what it means, so I'm at a lose...

Dag

Share this post


Link to post
Share on other sites
What version of the drivers have you got installed?

I think you must download and install version 2.5.0 of the Unified Runtime & Driver from their site, despite the fact that you may use SDK 2.4.4 (or whatever you are using).

And as grhodes_at_work said, have you tried running/compiling their samples/tutorials?

Hope that helps.

HellRaiZer

Share this post


Link to post
Share on other sites
Ok, just incase anyone was curious or having any similar problems I discovered my problem, I have both versions 2.3.3 and 2.4.4 installed on my computer, and for some reason i had the compiler setup to use v2.4.4 include files as well as the v2.3.3 lib and dll files, which is why things didn't add up. So in short, don't do stupid thing. :)

Fixed it up and its running now, thanks for the help,
Dag

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this