Shape Action not resizing bounding box

I have a shape action actuator which resizes a cube. The problem is that it does not affect the physics of the object, or the shape/size of its bounding box. I want the player to be able to hit return to resize the cube, to be able to fit it under and between other objects.

Is what I want to do possible? Is this a limitation of Shape Action actuator? I tried rescaling the box using python, but that functionality doesn’t seem to work in the game engine.

So what is the best way to rescale an object, along with its physics properties?


I tried using the Replace Mesh actuator, and it behaves the same way. When you turn on physics visualization, you can see that the mesh changes, but the phyics/bounding box remains the same.

-there isn’t really any work arounds… you can use an ipo to scale up an objects size… and have it push objects away as it scales bigger… but you can’t just have the collision shape update…

You can also replace objects… using the add object actuator.

I found this posts, which sounds like it could be a workaround:

you can use a collision hull, and parent your animated mesh and armature to it. (just need to parent the armature to the collision hull , the mesh should already be parented to the armature)

To change the size simply scale the collision hull, and snap IPO’s.

only problem with this method is that it will scale whatever is parented to it too.

Only problem is, I don’t know how to create a collision hull!

I wouldn’t mind replacing my object, or using an IPO, but I don’t know how to add the new object to the exact position of the object I’m replacing (the object is controllable by the user).

use an empty ghost object as the controller object… and just replace the growing object… you can join them together with a script or a rigid body joint.

UP !!


Does anybody knows if it is now possible with BGE 2.49RC3 ?

Thanks a lot for any help about this subject.


At least you can set “physics” On/Off…maybe useful?!

Thanks OTO,

What I want to do is as following :
I start by making a “replace mesh” on a small cube (replaced by a big one In the init script - logic bricks)
-> Then the bounding box still corresponds to the small one ()

How to solve this ? I need the collisions to be correct…

Thanks again

One more question :

You seems to say that there is a way to reload (by making it off, then on), if I understand what you mean.
At runtime, moreover…
How do you do that, please ?
Does it really update the bounding box (I already tryed to make an "Edit Object > Dynamics > stop and then restart it in a following state : it doesn’t do anything more) ?

Thanks a lot for your time


A “Collision Hull” is just a box or anything that you use to define the bounds of your collision. If you created a box, resized it, and made it invisible, you could use it for a “collision hull.”

Scale IPOs will modify physics stuff, so they’re your best bet. Why do you need to use Shape keys?


use this function in python

Hi agad66,

Replying to inactive topics is generally discouraged on these forums. This thread is almost 2 years old, and the last activity was over 1 year ago. Please limit your replies to threads which are within the first three pages of the board. The exception to this is the Finished Games board and the Game Engine Resources board. It is acceptable to reply to old topics there if you would like to comment on someone’s game or ask a question about a resource.