Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Fog and OnTriggerEnter() not working in Unity flash build.

Discussion in 'Flash' started by FPSyndicate, Dec 31, 2011.

  1. FPSyndicate

    FPSyndicate

    Joined:
    Mar 31, 2011
    Posts:
    39
    My game for the Flash in a Flash contest uses fog, but when i build the game for flash dev elopment, it does not show fog. I'm using normal linear fog.

    Another problem that i have is that i am using OnTriggerEnter() in my script and in the flash build it is not detecting the trigger, and therefore my game cannot run.

    Both of these work perfectly fine in EditMode and all the other builds

    Does the flash build not support fog, and OnTriggerEnter()? If so, are there other ways i could BS these and find a workaround?

    The fog coupld probaly be simulated with a flat plane that fades to grey, but could i maybe do a trigger using some sort of raycast?

    Thanks
     
    Last edited: Dec 31, 2011
  2. Blacklight

    Blacklight

    Joined:
    Dec 6, 2009
    Posts:
    1,241
    I had the same problems as you, and as a result had to use alternatives. If there's something I'm missing I'd very much like to hear it.
     
  3. jakehaas

    jakehaas

    Joined:
    Aug 17, 2008
    Posts:
    98
    I'm not sure about fog, I'm not using it I'm my Flash game.

    As for OnTriggerEnter() you need to put collision : Collision in the arguments or it wont work in flash.

    Here is a quote from one of the Unity devs:
     
  4. BrUnO-XaVIeR

    BrUnO-XaVIeR

    Joined:
    Dec 6, 2010
    Posts:
    1,687
    I had to reinstall 3.5 to make it work. Maybe you are under the same issue.
     
  5. SpreadcampShay

    SpreadcampShay

    Joined:
    Dec 9, 2010
    Posts:
    180
    I had the Triggers not working either, causing me to rewrite a larger portion of what I was working on. I already did pass the argument to OnTriggerEnter. It would appear the problem in my case was the Character Controller. It simply did not recognize it (or only randomly). I'm using a Rigidbody / Capsule Collider approach on my player now and Triggers seem to work for me now...
     
  6. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    Its been working fine for me using c#?
     
  7. FPSyndicate

    FPSyndicate

    Joined:
    Mar 31, 2011
    Posts:
    39
    Bruno, did you have to reinstall 3.5 to make fog work or the triggers?
     
  8. FPSyndicate

    FPSyndicate

    Joined:
    Mar 31, 2011
    Posts:
    39
    Thanks Jake, i just didn't have the OnTriggerEnter(collider : Collider) argument in my script. that fixed the problem perfectly. And for fog i guess i'm gonna ave to get a plane that fades from alpha 0 to grey and put it always on top and use that as a sort of fog.

    Thanks for the help!
     
  9. BrUnO-XaVIeR

    BrUnO-XaVIeR

    Joined:
    Dec 6, 2010
    Posts:
    1,687
    That and a lot of things. It looks like my downloaded copy was a bad install, I just redownloaded and it is now working fine.
    But quality settings and fog seems to not work though.
     
    Last edited: Jan 2, 2012
  10. Aiursrage2k

    Aiursrage2k

    Joined:
    Nov 1, 2009
    Posts:
    4,835
    Last edited: Jan 1, 2012