Forum

Cannot read property 'body_id' of null

16 October 2015 18:29
Hi I am trying to use your raytest example and apply my own scene to it. However i get an error when i get to

var id = m_phy.append_ray_test_ext(obj_src, from, to, "ANY", ray_test_cb, true, false, true, true);.

It appears the b4w.min is looking for a body_id in my to object(which is just a float32array.. the console error is

Uncaught TypeError: Cannot read property 'body_id' of null
16 October 2015 18:57
I think i figured it out, in the example, the camera needs to have physics applied to it
16 October 2015 19:18
Hello,

Yes, you are right. And you pointed out that we forgot to put a check for object's physics into this method.
Thank you!
 
Please register or log in to leave a reply.