Jump to content
  • Advertisement
Sign in to follow this  
thelovegoose

Physx : implementing an inventory

This topic is 3302 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

I'm trying to implement an inventory similar to that of adventure games. Objects in the scene need to be removed from the scene (and will be represented in the inventory), and then will be replaced in the scene if they are removed from the inventory. It seems my options with physx are either to release the actor, or to disable it with actor flags. Is there a simple way to simply remove an actor from a scene without destroying it? Thanks in advance

Share this post


Link to post
Share on other sites
Advertisement
Sorry, no its that I need to temporarily remove an actor from the secen, but I don't want to destroy it (via release actor). I can set the various actor flags that will prevent it interacting with the scene, but I'm wondering if there is a more elegant way of doing this.

The idea is that the player has a bottomless sack which he can put objects in. He goes around collecting objects around the scene, and when he picks them up they vanish from the secen but are represented in the GUI in his sack. When he wants to take them out the sack, he drops them back into the scene, at which point I will want that object to start interacting (colliding etc) with the rest of the objects in the scene.

I don't want to release the actor because it will involve unnecessary freeing and allocation of memory and involve setting up the whole actor and shapes again, when I only want to remove it temporarily...

Edit : Maybe you are on the same wavelength :) - are you saying you did this using release actor?

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!