Ctrl P

Hi! how can i make a script for parenting? I need to parent an object with the camera with a mouse click in the object. I can start an action with a mouse click but I need this action to be parenting and don’t know how

See the Window module and Draw module

the draw module has the key events listed …

and the Window module handles capturing events and putting events into the event que.


I’m confused: I’m doing this for the Game Engine, so the only modules I can use are this:

Here i can’t find a makeParent, where is it? is there a makeParent?

makeParent is a method from the Object class, for the game engine i have the KX_GameObject, but how do i know if KX_GameObject is inherited from the Object class?

Oops sorry,

I didn’t realize that you don’t have access to other modules when using the game engine.

I’m not sure how you would do it then.


you’d need to emulate a parent in the game engine

there is no proper way to parent/unparent objects in the game engine that i know of