Well I am chaning from WoW to Recast and later from Recast to WoW.
What is crazy is that I have to fix my Tilebounds to do it right:
Code:
var origin = Constant.WOrigin;
bmin = new float[3];
bmax = new float[3];
bmin[0] = origin[0] + (Constant.TileSize * X);
bmin[2] = origin[2] + (Constant.TileSize * Y);
bmax[0] = origin[0] + (Constant.TileSize * (X + 1));
bmax[2] = origin[2] + (Constant.TileSize * (Y + 1));
And afterwards I have to do:
Code:
bMin.ToRecast(); ->
public static Vector3 RepairRecast(Vector3 o)
{
Vector3 ret = new Vector3();
ret.X = o.Y;
ret.Y = o.X;
ret.Z = -1 * o.Z;
return ret;
}
I cannot tell why I need the lastest thing to get the right boundaries?
EDIT: This is what I also do to the WMO!! The Problem is When I convert the Models from WoW To Recast I got wrong results, so I needed the upper routine.
Thinking about It now, what it does, is, it rotates everything about 90° around the Up Vector and Inverts it's height. might be this the Problem? Otherwise the mesh looks errorneous in RecastDemo I remember.
EDIT: I am wrong, It was only a call to the boundaries in WMO because I wanted to filter out unused models but I commented that filter out.
Is it maybe only some wrong parameters in Recast? (Regarding the wall?
If not, How should I "compare" such an Object? try to get one of those fences? (I cannot use a building, because I wont reach the starting point?)
Edit: I compared WMOs, Seem to be O.K.
@namreeb: What you saw was: I was having some kind of Waypoints it should follow. In that case you wouldn't really see that line. For testing purposes I removed the Waypoints, and: It really worked good, despite the fact of running against walls.
What you have to be curious about is: My Waypoints are using the right door, however my Recast wants to use the left?! which is definately not the shortest way. Look at the end of the video, it is not able to build the path any longer. :O