Move a group of vertex belonging to an object throught python in BGE

Hi everybody,

I’m trying to make a group of vertex move in the BGE, as explained in the title .
I modeled a kind of energy beam, like a Kamehameha, which is composed of three parts:

  • A base,which isn’t supposed to move
  • A head, the part that is going to travel
  • The ray, in between those last two part, which is going to be the support of the translation

So, what I want is to, upon a controller signal, move the group of vertex that are called “Head” along the Y-local axis so it can try to hit the target.

So far, this is what I wrote :

from bge import logic

def kamehameha():

cont = logic.getCurrentController()
own = cont.owner
scene =  logic.getCurrentScene()

#grab the energy beam 
Beam = scene.objectsInactive['Kamehameha']

#Orientation of the character
Orient = own.worldOrientation.col[1]


#move the part called 'Head'" along the direction defined by Orient for a distance of 5 BU. 

kamehameha()

Thanks a lot !

Here is the .blend file, in case it helps to clarify; ((:

Attachments

Kamehameha.blend (493 KB)

Nobody ? Any tips ?