PDA

View Full Version : Show flight path of balls


snoopy78
08-26-2009, 02:52 AM
Hi,

is it possible to show the flight path of objects?

I want to create 2 balls. And afterthat I want to shoot another ball against the two balls.

It is possible to show the trajectories of the balls, before shooting the third ball?

I've got a vector which defines the force of the third ball:
info.object.applyForce( vectorB.vec, 1 )

Or is it possible to show the flown pathes of the balls, after shooting the thrid ball?

Many thanks...

farshizzo
08-28-2009, 02:57 PM
You can use On-The-Fly objects to draw lines. So if you know the beginning and ending point of the balls path, then you could use the following code:viz.startlayer(viz.LINES)
viz.vertex(beginPoint)
viz.vertex(endPoint)
line = viz.endlayer()