Hello,
In general, is casting a Linecast intensive?
Could it be casted 100 times per frame easily? 1000?
Is Raycast less intensive?
I’m trying to figure out how heavily I can use it.
Thanks!
Nico.
Hello,
In general, is casting a Linecast intensive?
Could it be casted 100 times per frame easily? 1000?
Is Raycast less intensive?
I’m trying to figure out how heavily I can use it.
Thanks!
Nico.
Linecast = Raycast. How much you can use depends on your CPU…best thing is make a simple test and see what the results are.
–Eric
It would be slow. (I tried using raycasting to determine the corners of objects so I can cast shadows and it was too slow)
But as Eric says, just try it and see what happens.
Most likely though, you would have to find a better algorithm.
Thanks for your inputs.
I’ll give it a try.
Maybe I’ll use that approach to very specific situations, or try to find another workaround.
Nico.-
We are using a lot of Linecasts/Raycasts in our game. One important trick is not to cast every frame but only at defined intervalls.
Thanks! Yes, this is the way I’m heading.
Thanks for the tip.
Nico.-
Any chance you can mention exactly what you will be doing with the raycasts? There may be some ways to cut down the number of them you need to perform.