if you walk around navmesh agent, he will go in the opposite direction.
 	
ray gets stuck at the starting point. (although this is not a bug, but how to solve it?)
			


navmesh.showAgentDebug(objID, 1);  -- 1 is for active
 
 
physics.rayFromPoint(rayID, x,y,z,qw,qx,qy,qz,range, 0); -- the 0 is the optional query flag.
 ) is simply to offset the position. The code module in the panel for raycast from object shows how to do this.
 ) is simply to offset the position. The code module in the panel for raycast from object shows how to do this.x,y,z = entity.getPosition(obj)
dx,dy,dz = entity.getLocalOrientationByAxis( obj, 0,0,1 ); -- get direction for the entity.
qw,qx,qy,qz = entity.getWorldOrientation(obj) -- get the rotation
x=x+(dx*RadiusOffset);
y=y+(dy*RadiusOffset) + 0.5; -- offset from center based on rotation
z=z+(dz*RadiusOffset);
hitID,pox,posy,posz = physics.rayFromPoint(rayID, x,y,z,qw,qx,qy,qz,range,0);










Users browsing this forum: No registered users and 4 guests