I’m having trouble learning about line cast and ray cast…
Right now I’m making a game where you have to aim with the mouse and when you release it the system throw an object which the speed slows down with the time.
The problem is that my project is growing and I need to create more levels, but I cant do the level design properly without knowing where the object will stop…
Can anybody help me giving me the directions of the solution or some relevant info about linecast?
Raycast can be used to get information from objects you’re casting the ray at, Linecast returns true if there is a collider between the start and the endpoint of the line.
If prefer to use lineCast in case of linerender , you just say it should go from “a” to “b”, whereas the raycast casts a ray from a point in a direction of your choosing.
Personally I’d use a line cast for lasers and the like in games, and a raycast for shooting at stuff.
Linecast is slower but safer way to detect intersections. Raycast is faster but not accurate.