Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

My Player Capsule spun out of control

Discussion in '2019.2 Beta' started by TheK-B1000, Mar 21, 2019.

  1. TheK-B1000

    TheK-B1000

    Joined:
    Apr 16, 2017
    Posts:
    1
    While working in the editor I was testing camera trigger events when my capsule started to fall downwards in a spiral motion and then unity crashed.

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. public class CameraTriggers : MonoBehaviour
    6. {
    7.     [SerializeField] Cameras cameras;
    8.     [SerializeField] Cameras.CameraState cameraState;
    9.    
    10.     void OnTriggerEnter ( Collider other )
    11.     {
    12.      
    13.         if ( other.name == "player" )
    14.         {
    15.             cameras.cameraState = cameraState;
    16.         }
    17.     }
    18. }
    19.  
    This is my first time ever posting a bug like this!
     

    Attached Files:

  2. Chaz32621

    Chaz32621

    Joined:
    Apr 17, 2015
    Posts:
    199
    Does ur capsule actually have a collider on it?