N
N
Nicholas2016-07-05 06:29:34
Unity
Nicholas, 2016-07-05 06:29:34

How to prevent a wide object from falling (down) in unity3d with raycast?

I made my own character controller, but there is a problem (
so that the player does not fall (down) through other objects, I shoot the beam down in the center of the capsule, and if the center of the capsule goes beyond another object, then the capsule will go down! (the capsule, as it were, will enter another object) what options are there?, it's a pity you can not set the width of the beam))) so that it is with a width and a length like a capsule.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Daniil Basmanov, 2016-07-05
@ACCNCC

Beam width can be set, try Physics.SphereCast or Rigidbody.SweepTest .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question