Forum

Does append_ray_test_ext work with objects from other scenes?

04 January 2016 03:46
I'm using a chunk of code from the detail sample (mouse_cb -> append_ray_test_ext), but I've run into two issues.

1) No matter what value I put into the Collision ID filter, I'm getting all the objects hit by the ray cast. It's like "ANY is used instead of my filter. I can look at the collision_id value and see that objects are being returned in the callback that have a different name than I gave it.

2) The append_ray_test_ext is *not* returning any object that was brought into the scene via m_data.load() (from another scene). It does return objects that were in the originally loaded scene, though. Is there a restriction from using the camera from the active scene and finding ray collisions from objects loaded from a different scene?

I'm pretty sure I'm just missing a setup value somewhere. Can someone point me in the right direction?

Thanks in advance!
05 January 2016 12:38
1) This is a bug, I think we'll fix it by the next release. This happens due to the fact that the first loaded objects is always reported as having "ANY" collision id. Anyway thanks for reporting.
2) There is no such restrictions, you can always do any physics simulations from the dynamically loaded scenes. Did you assigned physics on the loaded objects? Or maybe it's somehow confused with the issue 1?
06 January 2016 02:51
ARRGH. I stared at this code for three days.

I wanted to hide the objects when I load them and show them when I'm ready, right? Yeah, but I didn't read the fine print:

https://www.blend4web.com/api_doc/module-data.html#.load


Hide loaded and disable physics objects

/facepalm

I assume https://www.blend4web.com/api_doc/module-physics.html#.enable_simulation is what I want when I show, yes?

My bad.. move along. Nothing to see here except a slightly embarrassed B4W user…but hey.. what's a little boolean among friends?

26 January 2016 16:40
Hi

The issue with incorrect collision ID has been resolved. Please check the upcoming release.
 
Please register or log in to leave a reply.