Hi,
My question is pretty simple: is there any way to detect if a path is using an offmesh link?
I would basically need to detect if a part of the path, between 2 corners, is an offmesh link or not…
Any idea?
Thanks!
Hi,
My question is pretty simple: is there any way to detect if a path is using an offmesh link?
I would basically need to detect if a part of the path, between 2 corners, is an offmesh link or not…
Any idea?
Thanks!
You can use NavMeshAgent.nextOffMeshLinkData to check if there is an offmesh link in the path.
However, it works only for 1 offmesh link.. how to check if there are several in the path?
– Nicolas-LiattiNo problem, thank you for your effort anyway! My player is moving almost in the correct direction. If my Rotation is 0 my player is moving up (Thats correct) if my rotation is -90 its moving down but it should move to the right. If the rotation is 180/-180 its moving up again.. I'm very confused because i dont understand why. I've tried dividing my .forward like if(InputY != 0) { transform.Translate((transform.up / 2) * InputY); } but it doesnt help me
– Bizzy1994
Yeah, sorry. I haven't used 2D before, it seems Y and Z are swapped there. So transform.up should indeed be correct. In which direction is the character moving? Totally random or e.g. perpendicular to the correct direction?
– doublemax