Help wanted: Parenting objects with “character physics”.

Help wanted: Parenting objects with “character physics”.

I’m trying to figure out parenting issues while using the “character” physics in the physics tab. Here we go…


“Cube A”(with “character” physics) has a parented child “Cube B”(with no collision)

When variable is true, “Monkey A”(with “character” physics) will become a child of cube B, sharing translation, and rotation.

(Note: I’m using the “Cube A” & “Cube B” parent/child system to avoid collision problems with “Cube A” and “Monkey A” which both have character physics.)

What actually happens:
The way I have it set up, whenever “Cube A” or “Cube B” move, “Monkey A” just… flies away… It’s clear it’s a translation/rotation issue, as when “Cube A“ & “Cube B” are at a local position of 0,0,0, and either have a rotation of any amount, “Monkey A” continuously spins around the parent at a rotation speed equal to the static rotation of “Cube A” or Cube B” (No animations in project)

All in all, I would much appreciate any insight and or help from someone helpful. (And since I’m a beginner, I feel moved to give an obligatory “HALPMYBRAINHURTZ!!!1!!!l!!!"

I excitedly await ideas and solutions.
To an awesome community, “Thanks”.

Just make a mini script to copy rotation and translation like:

import bge
child = bge.logic.getCurrentScene().objects[‘NameOfChildObjectGoesHere’]
parent = bge.logic.getCurrentController().owner #<---- if script is attached on the parent , if not do as above
parent = bge.logic.getCurrentScene().objects[‘NameOfParentObj’]
child.worldPosition[0] = parent.worldPosition[0] + someOffset #<---- that’s X axis
child.worldPosition[1] = parent.worldPosition[1] + someOffset #<---- Y axis
child.worldPosition[2] = parent.worldPosition[2] + someOffset #<---- Z axis
child.worlOrientation = parent.worldOrientation

and it should work , hopefully , just remove the comments … check errors in console and import bge

It would help if you included the blend file cause I’m not sure if this is what you are trying to do.