Paths (for enemies)
by Mr.Trance · in Torque Game Builder · 01/25/2010 (2:12 pm) · 2 replies
I believe such great engine as TGB must have some sort of tools of script functions to implement the following: my enemy ships needs to fly via some sort of curved path (not just straight from point A to point B) like circle, or any other curved line.
Regarding this I have 2 questions:
1. Is there a way to add a path to some object so that this object will move via this path in fixed time?
2. Is there a tutorial to cover pathing in TGB and Torque script?
Regarding this I have 2 questions:
1. Is there a way to add a path to some object so that this object will move via this path in fixed time?
2. Is there a tutorial to cover pathing in TGB and Torque script?
About the author
Young indie game developer from far far city.
Torque Owner Devin Horsman
Look at t2dPath and the function attachObject. You can create paths from script. To get curves, use the Catmull-Rom or Bezier path mode.
I don't know how much the tutorials cover (there is one for path in the documentation), but creating a path object from script is not dificult, you just add the points the path goes through and then attach a scene object.