playMaker

Author Topic: FALSE statement on Game Object is Visible is broken.  (Read 2332 times)

4ppleseed

  • Full Member
  • ***
  • Posts: 227
    • View Profile
FALSE statement on Game Object is Visible is broken.
« on: May 06, 2013, 11:04:50 AM »
Seems the FALSE statement on Game Object is Visible is broken.

Discussion started here:
http://hutonggames.com/playmakerforum/index.php?topic=3787.0

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2484
  • Yup.
    • View Profile
    • Cleverous
Re: FALSE statement on Game Object is Visible is broken.
« Reply #1 on: May 06, 2013, 11:21:34 AM »
Confirmed.. Weird..

It returns True regardless of visibility status.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12351
  • Official Playmaker Support
    • View Profile
Re: FALSE statement on Game Object is Visible is broken.
« Reply #2 on: May 07, 2013, 12:57:41 AM »
Hi,

 I think the name of this action is confusing. From a technical point of view, a gameobject is considered visible when it's withint he camera visibility, where or not it is visible to your eyes. so you could have a object with a completly transparent material, it will be true still.

 can you define visible in your case? do you expect this to set false when the object is disabled? or when the material is transparent, or without a mesh?

bye,

 Jean

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2484
  • Yup.
    • View Profile
    • Cleverous
Re: FALSE statement on Game Object is Visible is broken.
« Reply #3 on: May 07, 2013, 04:13:08 AM »
Well the test I did was create an object and change the rotation speed when it is in/out of the camera's view and regardless if the camera could see it or not it always went into the true state. I tried starting with the camera looking the opposite direction, starting in view, the turning it out of view, etc..

It always returned "true", as if it was visible all the time when the camera clearly could not see it. I couldn't ever get it to return false.

4ppleseed

  • Full Member
  • ***
  • Posts: 227
    • View Profile
Re: FALSE statement on Game Object is Visible is broken.
« Reply #4 on: May 07, 2013, 05:26:57 AM »
Yep, me too. I expect my projectile prefab to destroy itself once out of the view of the camera but it stays alive no matter how far out of the view it goes.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3207
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: FALSE statement on Game Object is Visible is broken.
« Reply #5 on: May 07, 2013, 12:12:08 PM »
Is it visible in the Scene View?

Somewhat annoyingly Unity includes the Scene View camera when checking visibility:
http://docs.unity3d.com/Documentation/ScriptReference/Renderer-isVisible.html


Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2484
  • Yup.
    • View Profile
    • Cleverous
Re: FALSE statement on Game Object is Visible is broken.
« Reply #6 on: May 07, 2013, 01:06:04 PM »
Hah... Thats kind of funny.

Here's a test scene, works fine if you dont see it in either view.

4ppleseed

  • Full Member
  • ***
  • Posts: 227
    • View Profile
Re: FALSE statement on Game Object is Visible is broken.
« Reply #7 on: May 08, 2013, 06:22:18 AM »
Is it visible in the Scene View?

Somewhat annoyingly Unity includes the Scene View camera when checking visibility:
http://docs.unity3d.com/Documentation/ScriptReference/Renderer-isVisible.html

Oh wow. Haha, I was using the scene view to see if it disappears once out of the camera view!  :o

Thanks of the feedback.