Sign in to follow this  
thelovegoose

Physx : implementing an inventory

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
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

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