- Home /
Capsule Cast Direction Help
Forgive me but new guys are known to ask dum questions... static function CapsuleCast(point1: Vector3, point2: Vector3, radius: float, direction: Vector3): bool isnt the capsule sweep always from point 1 to 2 or 2 to 1. what is direction for? when you pass it transform.forward and the points are left to right what does that mean. Maybe I'm still thinking of rayCast. Thanks in advance...
Answer by christinam · Aug 06, 2013 at 09:40 AM
"The capsule is defined by the two spheres with radius around point1 and point2, which form the two ends of the capsule and direction is the direction into which to sweep the capsule."
Basically you define the size of your capsule using the two points and radius then you say which direction you want to sweep it in. More information can be found here:
http://docs.unity3d.com/Documentation/ScriptReference/Physics.CapsuleCast.html
Thanks. O$$anonymous$$. I believe I get it now. If I'm right and if anyone is still confused, the points are used to create the capsule. What "sweep" is, is the capsule "thrown" in a direction. I finally got it after reading the sphere cast manual
Your answer
Follow this Question
Related Questions
Why is CapsuleCast/Raycast performance effected by rigidbody? 1 Answer
Physics.SphereCast please help understand 0 Answers
How to detect which side is the raycast hitting? 2 Answers
My Raycast acts like it's hitting something when it isn't 0 Answers
Creating custom character controller collision checking 0 Answers