I'm trying to set up physics through python, what I want is an object fired from an empty at every mouse click. My first problem is spawning an object (the bullet), my class asks for a gameObject which can't be a "bpy" data as I tried here, how can I tell python that I want to use this "Icosphere" object ? Same issue with the KX_SCA_AddObjectActuator
, I need to provide the refered object.
In this picture the click pops up a sphere but it creates two of them, one on pressure and one on relief, just as when following the answer. I want only on object created with a mouseclick.
Added a check for the sensor status (from this list): I think it speaks for itself.