I have created an animation that works perfectly with alt+A. I tried to use actuators and a script to make it work in bge, but everytime I run it the plane disappears. Here is the blend file.

If you move the mouse, the 3 arrows follow the cursor. When you right click on the ground plane, the animation should have taken place. It does not. Instead the ground plane disappears leaving behind a small green line.

Here is the module code:

#Import the bge library.
import bge

#Make the mouse cursor visible during game running time.

#Set the current game scene and python controller to variables.
scene = bge.logic.getCurrentScene()
cont = bge.logic.getCurrentController()

#The function "initialization" is responsible for setting all scene objects, object sensors and object actuators to variables.
#These variables are created into the function but are for global use. Their names are the names of the objects/sensors/actuators in blender.
def initialization():
    for k in scene.objects:
    for k in ground.sensors:
    for k in cont.actuators:

#The function "empty_to_pos" gives the cursor_empty coordinates on the ground.  
def empty_to_pos():
    cursor_empty.worldPosition = (mop.hitPosition[0],mop.hitPosition[1],ground.worldPosition.z)

#The function "cursor_anim" is responsible for the start and end of the cursor animation.
def cursor_anim():

if (right_click.positive):  

print ("I reached the end of track.py")

and an image: image

Any ideas why the animation is not working and why the plane disappears? Thanks


1 Answer 1


Action (animation) actuators need to be part of the object, which you want to animate.

In the .blend, the animations are applied to the "ground" plane instead.

To make objects interact with each other in the logic editor, select them at the same time using Shift + Leftclick in the Outliner:

selecting multiple objects in the Outliner

You will see the objects in the logic editor:

interlinking multiple objects in the logic node editor

Then edit the logic so that one object's controller controls other objects' actuators:

finished interlinking

You can see the full process in this video. Unfortunately two of the arrows don't animate correctly and I'm not sure why that is. Perhaps their transformations need to be applied?

  • $\begingroup$ Many thanks, I did not know they had to be in the objects themselves.The mistake you referred to happens because the actuators 9 and 5 had starting and ending frames 0 to 0. Should have been 60 to 100.My bad. $\endgroup$
    – Lev
    May 5, 2015 at 13:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .