Setting Objects To And From "Ghost" Mode In BGE

Hey Blender People,
This is my first ever fourm post, so you probley havn’t ever heard of me before, but im going to try get my self more “known” on this fourm :rolleyes:

What i wanted to know is if anyone knows how to set a mesh between “Ghost” mode and “Dynamic” mode in the game engine… If anyone knows how, Please post on this fourm.

McBain :rolleyes:

If you mean make it into a static mesh, cause ghost and dynamic are two separate things, so are you aiming to turn off its gravity, or make it go through objects or both? I don’t think theres a way to change those setting in the runtime but you could try replicating the object and have it in the logic so when you want it to be changed, it ends the current object and adds the new one at the same time. I’ll put an example with just the ghosting. Oh and welcome to BA :smiley:


eg.blend (123 KB)

When you mean replicating the object do you mean like replaceing the mesh with another the same but with ghost mode on? :confused:

Oops, sorry I meant duplicating and yes basically like that lol.

Ok lol i know what you mean :wink:

What if instead of ending the object and adding a new one, you replaced the mesh with an exact copy of the original except with collision off on the faces through edit mode with the replace mesh actuator? Hmmm…

In a full game -
that could cause a fair bit of lag by completley replacing the mesh, and things might get pythony if you get to much into it. :confused:

Replacing the mesh during the game has no effect on the physical representation : the object will not become ghost and the physics shape will not change.

There is currently only one way to make an object ghost during the game: use the setParent actuator, it will disable dynamics and set the object ghost. If you parent it to the landscape, the object will stay fixed.

Collision detection still works on ghost object, there is simply no reaction force.

So what your saying:
is that the setParent actuator stops physics for the object… wow thanks i really needed that :cool: