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.
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 3 guests