arielrv / maratis

Automatically exported from code.google.com/p/maratis
0 stars 0 forks source link

isVisible() default state is true #19

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The isVisible() state of a deactivated object is true, should be false.

Another issue, maybe related to Bullet, is that isVisible() returns true when 
the object is hidden behind a wall for example.

NB: I'm using r205

Original issue reported on code.google.com by MaratisB...@gmail.com on 21 Sep 2013 at 12:57

GoogleCodeExporter commented 8 years ago
isVisible just returns the state of m_isVisible (usually updated by the 
updateVisibility function)
use isActive first to skip deactivated objects

isVisible() is related to frustum culling (inside the camera view), it doesn't 
take account of walls or other objects occlusion. It is only used during the 
current point of view rendering because it is view dependent.

For a more precise visibility test you can send a ray using the physics context 
or using MMeshTools raytracing (slower).

Original comment by anael.se...@gmail.com on 22 Sep 2013 at 10:18

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
"use isActive first to skip deactivated objects"

I was expecting the isVisible function to perform this check before returning 
the visibility test.

Currently, even if the deactivated object is outside of the point of view, true 
is returned.

Original comment by MaratisB...@gmail.com on 24 Sep 2013 at 1:01

GoogleCodeExporter commented 8 years ago
both functions don't execute any code, they just return a variable (m_isActive 
and m_isVisible) so both are fast

Original comment by anael.se...@gmail.com on 25 Sep 2013 at 7:56