Logic Editor, use the Action Actuator to create transition between to position

I am using the Action actuator to animate my camera to various position.
As there is a lot of position to which I want it to go, I have to create all the combination of animation possible.

So I was wondering if I should have animations made of only 1 keyframe and blend them to each other.
I had a blend of 100 frame and only one key frame at 0 of my animations.
But I have no transition happening.

Any ideas ?

I think for this to work there must be 100 keyframes, so just add another at frame 100 thats the same as frame 0 :).

Another way I did it was with python. This way is more modular, although it produces a different animation, here’s the script(Or what I can remember, typing this from my head so hopefully it works :D):

import bge.logic
obj = logic.getCurrentController().owner

#Determine where we want to go. I did this by having a Property in the camera which was a string. I then check which one it was and set that to a location
#Too add to this just copy the if statement and change Home to whatever you want to call the position, and change the Location = [To whatever the position of the camera is]
if (obj["Position"] == "Home"):
    Location = [0,1,0]#The coordinates of the camera
if (obj["Position"] == "ASD"):
    Location = [0,0.8,0.4]#The coordinates of the camera
if (obj["Position"] == "IFBlah"):
    Location = [0,1,1000]#The coordinates of the camera
Scale = 10#Speed of transfer
xdif = (obj.worldPosition[0]-Location[0])/scale
ydif = (obj.worldPosition[1]-Location[1])/scale
zdif = (obj.worldPosition[2]-Location[2])/scale

obj.worldPosition[0] -= xdif
obj.worldPosition[1] -= ydif
obj.worldPosition[2] -= zdif

So to make the camera move simply change its property Position :slight_smile:

Pretty simple:
Create an action with a key frame for each required position.
E.g. frame 1 = position 1; frame 2 = position 2; … frame n = position n

The trick is - you do not animate the camera. You animate an empty (or a separate camera). You do this with Property mode. This way the empty immediately “jumps” into the desired position (given by the property).

You parent the active camera to the empty. This makes the camera jump to the empty too. To get the transition effect you activate slow parent with a time offset.

Warning: This method does no prevent the penetration of other objects! Nevertheless it is a pretty simple and effective solution.