- Home /
IsFinite error - not generating output on screen for OnTrigger Script
The script outputs questiontrigger = true 2-3 times upon starting Unity and the scene, however will not generate this output, but instead gives the following error: !IsFinite(outDistanceAlongView) UnityEditor.EditorGUIUtility:RenderGameViewCameras(Rect, Rect, Boolean, Boolean) UnityEditor.EditorGUIUtility:RenderGameViewCameras(Rect, Rect, Boolean, Boolean) UnityEditor.GameView:OnGUI() System.Reflection.MonoMethod:InternalInvoke(Object, Object[]) System.Reflection.MonoMethod:InternalInvoke(Object, Object[]) System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo) System.Reflection.MethodBase:Invoke(Object, Object[]) UnityEditor.HostView:Invoke(String) UnityEditor.DockArea:OnGUI()
[/Users/build/builds/unity-26/unity-2.6.x/Projects/../Runtime/Camera/RetainedRenderqueue.cpp line 335]
Following is the script: The player runs into a sphere object, "QuestionMark", and to test whether or not the collision works, I have Debug.Log in there.
var questiontrigger: boolean = false; var mover : DroppableMover; var playerStatus : ThirdPersonStatus; var QuestionMark : GameObject;
function Start () { // do we exist in the level or are we instantiated by an enemy dying? mover = GetComponent(DroppableMover); }
function OnTriggerEnter (col: Collider) { if(mover && mover.enabled) return; var playerStatus : ThirdPersonStatus = col.GetComponent(ThirdPersonStatus); Debug.Log("YES"); if(col.gameObject.tag == "Player") questiontrigger = true; print("questiontrigger = true"); //Destroy(QuestionMark); }