BGE vertex manipulation

Hi (once again),

I am making a game and I have 2 objects an I want to make a Visible line between them.
My first idea is having a cube and get the vertex and apply 4 to each obj
is there a another way or an example on vertex manipulation

Greetings:

  • winspeednl

You could write a script that uses render.drawline to draw a line between the two objects then you wouldn’t have to worry about doing any vertex manipulation.

Just do this,

Scale the plane so it is 1 bu long on 1 axis, x axis in this,example

Vect=Plane.getVectTo(target)
Plane.alignAxisToVect(Vect[1],0,1)
Plane.localScale= (1,Vect[0],1)

Tada

The 2 objects where the object bust be are moving.
how about that

EDIT: what about bones?
Apply bones to the vertecis and move the bone to the target

kevincorrigan I want to put a texture between there (like in Gary’s mod)

Check it out.

Attachments

LineGen.blend (427 KB)

With this method it does exactly what you ask,
Without all that mucking about in hyperspace…

Thanks BluePrintRandom :smiley:
that is exacly what i need

This is where I needed it for :wink: