|
Hello, I've been using the Physics.Raycast to cast where my mouse position is, relevant to the scene (Camera.main.ScreenPointToRay). But the Raycast is too precise, and so I want to try and introduce the CapsuleCast, but I am having a few problems trying to replace it. This is what I am trying to achieve : 125 Here is my old Raycast: And I'm just simply trying to convert this to work with the CapsuleCast: I'm not 100% sure on what I'm suppose to do with the p1 and p2 - What I'm trying to get is for a capsule to raycast on down on anything on my scene that the mouse position is over with a radius of 10. Would appreciate any help with this. Thanks
(comments are locked)
|
|
Try
is there a way I can do a Debug.DrawLine for the whole sphere?
Jun 30 '11 at 04:00 PM
oliver-jones
This doesn't seem to be doing the job
Jun 30 '11 at 05:02 PM
oliver-jones
It should work. Note that this is a replacement for your original Raycast, not your capsule cast. Note that the shape of a SphereCast is a capsule (obvious when you imagine it).
Jul 01 '11 at 12:07 PM
Waz
Note that a SphereCast is shaped like a long, sideways capsule... but a CapsuleCast is shaped like a long "bar" of sorts with upright capsules on the "ends", which might be what he really want (like if his trying to do a check if a capsule collider will fit in a space, SphereCast is probably not what he wants).
Jul 01 '11 at 12:59 PM
PrimeDerektive
@Derek Traver - that is exactly what I want, how would i go about doing that?
Jul 01 '11 at 01:44 PM
oliver-jones
(comments are locked)
|
125
All I want is to make the raycasts width a bit wider.