Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    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?