Grid Weight
by Shakey · in Torque Game Builder · 11/25/2009 (11:31 am) · 1 replies
Hi I have a couple of questions Reading over the aStar Pathfinding documentation, I have come across a term. What is a grid weight.
Also in reading the documentation you select the starting location and the ending location(destination). When the enemy objects spawns, I really don't want it to take the shortest route to the destination. I have a maze that I want the enemy to follow, built with a tilemap, so it it a predetermined path the enemy should take. would this still work.
I will probably have to set up collision on the tilemap so the enemy would not go through the grid right. My enemy would be following along a straight path and frequently make 90 degrees turns.
Also in reading the documentation you select the starting location and the ending location(destination). When the enemy objects spawns, I really don't want it to take the shortest route to the destination. I have a maze that I want the enemy to follow, built with a tilemap, so it it a predetermined path the enemy should take. would this still work.
I will probably have to set up collision on the tilemap so the enemy would not go through the grid right. My enemy would be following along a straight path and frequently make 90 degrees turns.
Torque Owner RollerJesus
Dream. Build. Repeat.
So, you don't need collision, but rather weight the areas that you don't want to actor to travel on and the A* alogorithm will have them tend towards that path.
For instance, high grass may have a slightly higher weight than a road, while mountains may have a very large weight compared to a road.
Patrick