Forum

m_physics.append_ray_test_ext() = B4W ERROR: No physics for object Camera

18 May 2017 16:19
Hello,
i try to reproduce the Ray test like this exemple : https://www.blend4web.com/apps/code_snippets/code_snippets.html?scene=raytest (just clicking on a mesh surface for placing a spot on it, where the click is..)

When i try with an empty project i can make it works, but when i want to implement in an old already made scene i can't make it works… i always have the following error in my JS Console :
B4W ERROR: No physics for object Camera

I can not find where i can make this Camera enable to Physics, and i don't know why in a case the Camera has_physics, and why not in another case… who look like very close of the first case

In blender, here is my settings :
- Camera : [Physics Tab] -> Object Physics is checked, Physics Type = Static
- Plane for clicking on it : [Material Tab]-> Special Collision is checked

Thank you for your help,
… i really not understand how to set has_physics of my camera to true for make it works
18 May 2017 17:13
Hello,
Here is the camera settings for a ray casting:

This behavior is strange. Could you attach the simple example? I can take a look and modify the project code
18 May 2017 17:38
it was a very dumb human error… shame on me ! ;-)

it was in the exports.init()… physics_enabled property was on "false"… pfff

exports.init = function() {
        m_app.init({
           ...
            physics_enabled: false,
            ...
        });
}


i'm so blind sometimes !
 
Please register or log in to leave a reply.