Code Monkey home page Code Monkey logo

Comments (3)

peardox avatar peardox commented on June 7, 2024 1

Found my problem with Children not having WasVisible

I was calling it in Render rather than Update :(

Of course, in Render, it won't have been set yet it seems as swithcing to Update fixed it

from castle-engine.

peardox avatar peardox commented on June 7, 2024

Hmm : Testing TCastleScene(ActiveScene.Items[0]).WasVisible actually also returned false so maybe there's another problem?

from castle-engine.

michaliskambi avatar michaliskambi commented on June 7, 2024

It's a deliberate feature that TCastleScene.WasVisible doesn't check whether children scenes are visible. The general rule is:

  • TCastleScene-specific features (like this WasVisible) do not care/apply to children scenes.
  • Only TCastleTransform features (like TCastleTransform.Exists) apply to children as well.

I know it's not ideal (it would be easier to say "everything affects children" or "nothing affects children"), but this is a practical situation that is flexible and comfortable, so we'll keep this.

I see the docs have not been clear about it, fixed.

Hmm : Testing TCastleScene(ActiveScene.Items[0]).WasVisible actually also returned false so maybe there's another problem?

I tested examples\viewport_and_scenes\test_was_visible\, it correctly changes WasVisible. Please submit a testcase if this doesn't work for you.

from castle-engine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.