JohnK Posted December 13, 2017 Share Posted December 13, 2017 On colliding with a box the camera sees through the box. In the following PGs I have used camera.ellipsoidOffset to place the camera at the middle of the ellipsoid (line 86) and used two viewposts. The lower viewport uses a second camera slightly above and behind the main camera. I have added a cone to represent the main camera with an ellipsoid around it. I have also customized the key input behaviour. Up and down arrow keys move the camera forward and backward , left and right arrow keys turn the camera. I have also lowered the speed of the camera. Face a box and walk towards it until it collides and will not move forward. You can see through the box. https://www.babylonjs-playground.com/#DHMD1C There is also another mystery as the camera moves forward it rises upward as can be seen by the spheres parent to the main camera. At the start you can only see the top of the sphere then as it moves the whole of the sphere becomes visible. You can see the changes in y in the console. Perhaps they are to do with my customised input manager but no - I removed it and did a PG with default behaviour same problem https://www.babylonjs-playground.com/#DHMD1C#1 TLDR; These issues came to light as I am in the middle of writing a PBT (playground based tutorial) for camera collisions, gravity and customized camera inputs and have been following this thread with interest. Last week I never noticed the gravity issue or the see through the box issue. Now whether changes instigated as a result of this thread has altered some property of the camera or I am mis-remembering what I saw a week ago or was just too focused on the code for the PBT I am not sure but the mystery is there now. Quote Link to comment Share on other sites More sharing options...
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.