Physx error

Started by
5 comments, last by Daglamier 17 years, 7 months ago
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
Advertisement
You surely can't expect anyone to troubleshoot that with just that one line of code. Give more information. I don't know what "no matter what" means you've tried.
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
Richard 'ViLiO' Thomasv.net | Twitter | YouTube
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
Have you tried building some of their tutorial programs, and stepped through those to see if they succeed where your code fails?
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net
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
HellRaiZer
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

This topic is closed to new replies.

Advertisement