Jump to content

[C#]Raycasting limits?


Recommended Posts

Hi I just wanted to know if there is a built in limit to raycasting and also if there is favoritism with raycasting. I am using scripthookvdotnet rather than the natives to accomplish raycasting, however I did create my own raycast with natives to see if there is a difference, but there was none. is there a set limit to raycasting, or could it be manipulated some other way?(I tried creating a second raycast from the furthest distance but no result)

 

And I noticed that some entities are easier to detect even at incredible distances like airplanes/helicopter, but others like car/peds aren't detected past maybe 100 feet. There seems to be favoritism in that it picks up maps better than anything else, but even in that instance some buildings or part of a buildings are better detected than others. And I don't know what else can influence raycasting but the distance it can discern things changes. Sometimes it could detect a far away buildings but other times it won't. Is this how it's suppose to work or is there something not right?

Link to comment
https://gtaforums.com/topic/888140-craycasting-limits/
Share on other sites

Hi I just wanted to know if there is a built in limit to raycasting and also if there is favoritism with raycasting. I am using scripthookvdotnet rather than the natives to accomplish raycasting, however I did create my own raycast with natives to see if there is a difference, but there was none. is there a set limit to raycasting, or could it be manipulated some other way?(I tried creating a second raycast from the furthest distance but no result)

 

And I noticed that some entities are easier to detect even at incredible distances like airplanes/helicopter, but others like car/peds aren't detected past maybe 100 feet. There seems to be favoritism in that it picks up maps better than anything else, but even in that instance some buildings or part of a buildings are better detected than others. And I don't know what else can influence raycasting but the distance it can discern things changes. Sometimes it could detect a far away buildings but other times it won't. Is this how it's suppose to work or is there something not right?

I learned how to raycast from the Guadmaz Map Editor mod by. The default distance is good enough for me, but try changing LOD, that may make a difference.

Link to comment
https://gtaforums.com/topic/888140-craycasting-limits/#findComment-1069601771
Share on other sites

Hey MoMadenU, I tried adjusting LOD. I'm still not sure if that made a difference. At one point the raycast manged to hit coords from incredible distance, but after multiple trials it doesn't detect any hits. Also the favoritism still remains, it rather detect maps over peds past 100ft, even though they are on the screen.

Link to comment
https://gtaforums.com/topic/888140-craycasting-limits/#findComment-1069602232
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 0 User Currently Viewing
    0 members, 0 Anonymous, 0 Guests

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.