Dad72 Posted July 26, 2014 Share Posted July 26, 2014 Hello, The free camera can detect collisions, but the rotate camera does not allow it. I used the rotate camera the view to the 3rd person and not a FPS and I would like my camera can not rotate through the ground and walls to. Gravity is not necessary for this type of camera, just the colision with the camera rotate as is done with the camera free. Please Deltakosh, you could add it to the camera rotate. thank you very much in advance. This will be very useful for the games of type RPG. Thank you very much Quote Link to comment Share on other sites More sharing options...
Dad72 Posted July 26, 2014 Author Share Posted July 26, 2014 ... Quote Link to comment Share on other sites More sharing options...
Dad72 Posted July 30, 2014 Author Share Posted July 30, 2014 It is possible Deltakosh to have collision detect on a cameraRotate to avoid crossing the walls. Quote Link to comment Share on other sites More sharing options...
Temechon Posted July 30, 2014 Share Posted July 30, 2014 Hey Dad, still no answer from the big boss ?Can I ask why are you using a arcrotateCamera for a third person view ? If I were you, I would use a freeCamera with a custom behaviour (I guess you don't want the user to walk away with the keyboard arrows but just look around).Do this (not tested, but it should work) : var cam = new BABYLON.FreeCamera("cam", behindTheShoulderPosition, scene);cam.keysUp = cam.keyDown = cam.keysLeft = cam.keyRight = [];This way, you remove the keyboard behaviour, but you keep the rotation with the mouse. And you can use collision detection Quote Link to comment Share on other sites More sharing options...
Dad72 Posted July 30, 2014 Author Share Posted July 30, 2014 This is because my rotary camera rotates in orbit around the character. The features of the rotating camera corresponded more necessary, but only miss what detects the collision. The freecamera lacks the functionality of the camera rotate as one with the target radius. But thank you Temechon for your reply. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted July 30, 2014 Share Posted July 30, 2014 Hey, this is not something I planned but let me add it to the roadmap:) Quote Link to comment Share on other sites More sharing options...
Dad72 Posted July 30, 2014 Author Share Posted July 30, 2014 Thanks Deltakosh Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 2, 2014 Share Posted August 2, 2014 Done: https://github.com/BabylonJS/Babylon.js/wiki/09-Cameras-collisions (See last chapter) Quote Link to comment Share on other sites More sharing options...
Dad72 Posted August 3, 2014 Author Share Posted August 3, 2014 Thanks DK, Yes, it works, but the camera does not slide along the object collide (the wall) to track the movement of the character. Why the camera does not slip, which would be better I think? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 3, 2014 Share Posted August 3, 2014 It cannot. This is what I say in the documentation. I cannot keep the radius constant if the camera is sliding Quote Link to comment Share on other sites More sharing options...
Dad72 Posted August 3, 2014 Author Share Posted August 3, 2014 Ok, Thanks for the info Quote Link to comment Share on other sites More sharing options...
Dad72 Posted August 9, 2014 Author Share Posted August 9, 2014 There is really no other solution so that the camera does not hang with it collided. because in the use it is really very annoying this camera that blocks. Can be only a small rebound for not it this blocking, fixe this problem, no? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 9, 2014 Share Posted August 9, 2014 Even that is not that simple because of the radius constraint Quote Link to comment Share on other sites More sharing options...
Dad72 Posted August 9, 2014 Author Share Posted August 9, 2014 I imagine having to use another camera. I think that the new camera to study here should be work to do what I want, but I'm not sure.It's really a major disadvantage this collision blocking the camera for the use that I made.The advantage is that the camera rotate needs a target and a radius around the target. the freeCamera does not do this. 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.