question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to detect if road exists at Vector3 position

See original GitHub issue

Is there a function i can pass a vector3 and get a boolean back that tells me if there’s a road there?

Like:

if (World.GetRoadAt(pos)) {
     // Do something...
}

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
Nacorpiocommented, May 20, 2016

PATHFIND::IS_POINT_ON_ROAD(int x, int y, int z, Vehicle vehicle) You can leave the vehicle parameter as null.

0reactions
sollahollacommented, May 20, 2016

@JohnnyCrazy Thanks a lot man! I’ll just close this, and head over there.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Question - How can I check the Vector3 Position
I only want to check the "x" coordinate in an if-function block, whether it is smaller than 0.2f If not, it should move...
Read more >
unity - How to find the distance to the middle of the road ...
float projection = Vector3.Dot(roadRight, fromRoadToCar); if (projection > 0) { // Car is on the right side of the road. } ...
Read more >
position check between object and point. Unity3D
Use Vector3.Distance ! Preferably with a certain threshold distance. There is an example that looks exactly like what you want to do in ......
Read more >
Check if player is facing in the direction of a transform point?
The proper way to do this with an angle for FOV, which might be overkill for you, is to use the dot product....
Read more >
Scripting API: AI.NavMesh.CalculatePath
Use this function to avoid gameplay delays by planning a path before it is needed. You can also use this function to check...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found