Advertisement Jump to content
Sign in to follow this  

Physx Terrain creation exception

This topic is 1817 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

        PxHeightFieldDesc hfDesc;
	hfDesc.format = PxHeightFieldFormat::eS16_TM;
	hfDesc.nbColumns = data->grid_sizex;
	hfDesc.nbRows = data->grid_sizey;
	hfDesc.thickness = -10.0f; = samples;
	hfDesc.samples.stride = sizeof(PxHeightFieldSample);
	PxHeightField* heightField = PhysicsModule::getInstance().gPhysics->createHeightField(hfDesc);

I checked and the PhysX initialization is fine,yet,I still get an error when calling the createheightfield function. Also,everything I pass to hfDesc is not 0 or NULL.


I don't have any other data except that it's an exception.

Share this post

Link to post
Share on other sites

stupid singleton class is stupid...turns out there was something wrong with my singleton,so,I was using gPhysics when it wasn't initialized.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!