Dad72 Posted February 9, 2015 Author Share Posted February 9, 2015 Hi, I change the stage Raanan by adding models to instead. and as you can see there is a worry, the camera does not pass in front of the camera models and also flashes. He defrauded that it takes into account the size of each object, I guess. I have no idea how to solve this. Thank you for your help Raanan. http://www.babylonjs-playground.com/#12D0ST Quote Link to comment Share on other sites More sharing options...
RaananW Posted February 9, 2015 Share Posted February 9, 2015 Hi dad72, http://www.babylonjs-playground.com/#12D0ST#1 A short explanation -First - I made a small mistake. The radiusReset variable should only set to true if the radius was actually changed. That was the reason to some of the flickering.The other reason was fastCheck in the pick function. The problem was that the outer wall of the skull was detected and returned a hit. Setting the camera inside the skull actually made sense - you can see the object through the eye/nose etc', but it is not the desired functionality.Changing fast check to false inspects all of the parts of the mesh and returns the smallest distance. but (as the name suggests) it is slower. So maybe with walls, fastCheck set to true is correct, but with complex meshes, false is the right choice. Two arrays with "simple meshes" and "complex meshes" might come in handy :-) Dad72 1 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted February 9, 2015 Author Share Posted February 9, 2015 Thank you Raanan for your help. it seems perfect. This would be useful I think that such functionality is integrated directly into the engine. [edite] arf, It depends on the models, with some models, I have a flash of the camera. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted February 10, 2015 Author Share Posted February 10, 2015 I think I understood why. I use moveWithCollisions () on my scene and that create a kind of confusion I think here: pickInfo.hit. should integrate this functionality directly into the engine I think, with moveWithCollisions ()and it does not work if I tie with the parent item to character Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.