Jump to content

terrain check collision


thecco
 Share

Recommended Posts

i want to move using check the height of the terrain
 
but it's very difficult
 
how can i check collision the terrain model
 
i used free carmera 
camera.applyGravity = true;camera.checkCollisions = true;camera.ellipsoid = new BABYLON.Vector3(1, 10, 1);
 
model's position  = camera's postion
 
and moving camera instead of model
 
 
When stopped in the middle of the hill The model will automatically fall.
 
When you climb or descend a hill, The angle of the model change.
 
 
---
Once I combined freecamera and rotation properties of arcrotatecamera
 
engine.runRenderLoop (function () {    scene.render ();    model.postion = freecamera.postion;    box.postion = freecamera.postion;    box.rotation = freecamera.rotation;});
 
Doing so.
 
I need a little advice.
 
 
 

 

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