Random moving a camera to simulate an impact

Is there some good example to how random moving a camera to simulate an impact?

Is it better do to it with a script? Any tip to simulate an impact due to an explosion, which movements have to be applied to the camera? And how? With a script?

Any example?

Thanks

use IPO, and play it when explosion occur

Well, this is what I did, I placed an empty at the center of the scene, I did an ipo of 40 frames on location of the empty to have an impact of about 2 seconds, then I tracked the camera to the empty. If I press NumPad0 and then Alt A it works great.

Then in the game engine when I initialize all the things in the scene I also put an EditObject actuator on the camera, I set it to Track to and I specified the empty.

When it comes the time for the impact I change with a script a property of the empty which trigger the ipo for the empty

But nothing happens

Please help me!

you might have the ghost setting on… ghosts from other layers are kind of funky.

For my spaceship explosions I have them parented to an armature, with 5 different explosion sequences … so when it is time to blow it up, it is set to randomly pick 1 of the 5 animations.
I also have physics objects , so that it appears to loose parts .

hope that helps :slight_smile:

What is a ghost setting?

Btw I deleted the camera, placed a new one, tracked to the empty, and then what I see in the game engine is different from what I see in blender when I press numpad0 and the mouseover doesn’t work properly…

I still have to understand how cameras in the game engine work…

This is the blend
http://sudostorage.googlepages.com/apple-emp7c.blend

as you see

  • The mouse over doesn’t work properly, sometimes it says I’m over a key when I’m not or when I’m over another.
  • The mouse over does no work on the keys outside of the camera limits when I try to kill the keys
  • The camera does not track the ipo… well, actually in that version the tracked object is misspecified because it’s not “iBook bottom” but “COV”, but even when correctly specified it doesn’t work

To try you just have to point the key with the mouse and press the right key on your real keyboard :smiley:

If you notice something wrong let me know