Jump to content

[THREE.JS] Camera collision


Valento92
 Share

Recommended Posts

Hi guys. I'm developing a very small simulator with Three.js and Physi.js. The goal is a simple camera that can move irrestrictly in the space, but must not pass through solid Physi.js objects. I'm also using TrackballControls to handle camera movement. I tried attaching a BoxMesh to the camera but then everything disappeared from the screen.

 

My code so far is: http://pastebin.com/bNhEkPep

 

Don't mind my scene, I'm just really concerned with the camera passing through the objects. Another thing really weird happens when I zoom in infinitely from below the "floor".  :(

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.

Guest
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.

Loading...
 Share

  • Recently Browsing   0 members

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