0% found this document useful (0 votes)
10 views

Unity 2

This document describes the CharacterController.detectCollisions property in Unity. It determines if other rigidbodies or character controllers collide with this character controller, which is enabled by default. This property controls whether incoming colliders are blocked by the character controller's collider or can pass through it. Setting detectCollisions to false can temporarily disable collision detection for the character controller, such as when mounting a character onto a vehicle.

Uploaded by

Ramiro Aquise
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Unity 2

This document describes the CharacterController.detectCollisions property in Unity. It determines if other rigidbodies or character controllers collide with this character controller, which is enabled by default. This property controls whether incoming colliders are blocked by the character controller's collider or can pass through it. Setting detectCollisions to false can temporarily disable collision detection for the character controller, such as when mounting a character onto a vehicle.

Uploaded by

Ramiro Aquise
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

CharacterController.

detectCollisions
public bool detectCollisions ;

Descripción
Determina si otros rigidbodies o controladores de personajes chocan con este controlador de
personajes (por defecto esto siempre está habilitado).

This method does not affect collisions detected during the character controller's movement but
rather decides whether an incoming collider will be blocked by the controller's collider. For
example, a box collider in the Scene will block the movement of the controller, but the box may
still fall through the controller if detectCollisions is false. This property is useful to disable the
character controller temporarily. For example, you might want to mount a character into a car
and disable collision detection until it exits the car again.

using UnityEngine;

public class Example : MonoBehaviour

CharacterController controller;

void Start()

controller = GetComponent<CharacterController>();

controller.detectCollisions = false;

You might also like