Answer the question
In order to leave comments, you need to log in
Unity Physics.SphereCast: what do the parameters mean?
Hello!
I have a question about the parameters of the Physics.SphereCast method.
I read the documentation, but still have questions.
This method contains the following parameters:
origin - The center of the sphere at the start of the sweep.
radius - The radius of the sphere.
direction - The direction into which to sweep the sphere.
maxDistance - The max length of the cast.
With the first two (origin and radius) everything is clear. This is the center point where the sphere with the given radius is created.
It's not clear to me how to use direction and max distance.
If the sphere is created at origin, how can it have direction and distance? Or is the sphere created at origin and moving in a given direction for a given distance?
Can you clearly explain how SphereCast works?
Thank you!
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question