Download

Clicking and Collisions

My Actor is a spaceship cockpit, with the camera in it and some physics thrusters attached and simulate physics enabled.
I also have a control panel Actor, which is a child of the spaceship, and the control panel has buttons.

I have the following problem. If I move the child actor close to its parent, some collision occurs and on game start the spaceship starts rotating wildly. If I move the child actor a little bit away from its parent, this does not happen (but of course the control panel needs to be inside the ship).
To work around this, I changed the default collision on the control panel from BlockAllDynamic to None. And this does indeed stop the collision, and I can place the panel where I want. Unfortunately, I can not click on the buttons since the onClicked events stopped working when I disabled the collisions.

I might actually want collisions on the panel, imagine some item floating around in the cockpit.
So instead of disabling collisions can you please suggest a solution to cure the wild rotations?!

Ok I discovered that by changing it from BlockAllDynamic to Custom, and setting Physics Body to Ignore then I get the click events and it doesn’t go crazy when i start the level, BUT this still feels like a workaround and not addressing the original problem… why does the child actor of an actor collide with its parent? Can’t I somehow tell the engine these are the same structure and not to collide with each other, but keep collisions open for other things?

Can I weld thm together in some way so it all behaves as one object? Auto Weld is enabled for the sub objects but I don’t think it’s doing anything