Jump to content

Which camera will use for mobile hunting and shooting game? and how?


Recommended Posts


        I have using Free camera for my hunting game.:(

var arrow = [ ];           

var camera = new BABYLON.FreeCamera("FreeCamera", new BABYLON.Vector3(0, 2, -25), game_scene);
camera.attachControl(canvas, true);
 BABYLON.SceneLoader.ImportMesh("", "", meshPath, game_scene, function (newMeshes, particleSystems, skeletons){
    for(var i = 0; i < newMeshes.length;i++){
        arrow[i] = newMeshes[i];
        arrow[i].position = new BABYLON.Vector3(0,1.3,-24);
        arrow[i].rotation.z = Math.PI/2;
scene.onPointerMove = function (evt,pickResult){
  if(arrow != null){
        for(var i = 0; i< arrow.length;i++){
            arrow[i].rotation.x = camera.rotation.x;
            arrow[i].rotation.y = camera.rotation.y;
            arrow[i].position.z = camera.position.z;
        bow.rotation.x = camera.rotation.x;
        bow.rotation.y = camera.rotation.y;
        bow.position.z = camera.position.z+2;

i have added my code in pick to Move case? it's working in browser fast and flexible but in android device it's working too slowly...  please give me any solution for 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...