Author Topic: render same Object3D in multiple worlds?  (Read 155 times)

Offline MichaelJPCT

  • long
  • ***
  • Posts: 140
    • View Profile
render same Object3D in multiple worlds?
« on: May 21, 2017, 07:10:31 am »
the doc says Object3d should be added to 1 world only.
i wonder if an Object3d is added to 2 worlds and render them, what will happen, - only for rendering purpose.
1 of the World is used for shadow.
because the Object3d should be isolated in shadow World by my design, so i have to use another World, or i must call setVisibility many times.

Offline MichaelJPCT

  • long
  • ***
  • Posts: 140
    • View Profile
Re: render same Object3D in multiple worlds?
« Reply #1 on: May 21, 2017, 05:50:05 pm »
never mind this. i would use multiple Object3D with the same Mesh for my purpose.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11769
    • View Profile
    • http://www.jpct.net
Re: render same Object3D in multiple worlds?
« Reply #2 on: May 22, 2017, 10:01:31 am »
Yes, that's how to do it. The objects can share some data though, but you have to use different instances for multiple worlds.