Jump to content

CameraRotative with Collisions


Recommended Posts



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 

Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.



Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...