Jump to content

Search the Community

Showing results for tags 'freecamera'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





  1. I have free camera in orthographic camera mode. I don't want camera to move at all on mouse or any other kind of input. So I tried not calling attachControl with this, camera doesn't react at all (Good!) but boxes in this scene with actions registered to action manager also do not react to mouse inputs. Second approach I tried is calling attachControl with following function: scope.registerBeforeRender(function () { // I want top view camera.rotation.x = Math.PI / 2; camera.rotation.y = Math.PI / 2; camera.rotation.z = 0; }); When I try to move ground with mouse it
  2. Hi I have applied a freecamera to my project. camera = new BABYLON.FreeCamera("FreeCamera", new BABYLON.Vector3(-40, cameraHeight,-132), scene); I have applied gravity to it so that it won't fly ie: camera.applyGravity = true; I have given it a constant height (cameraHeight) scene.registerBeforeRender(function () { scene.activeCamera.position.y = cameraHeight; }); Now the problem is that when I move the mouse up and down along the Y axis the camera rotates (in essence on the x-axis). So the camera is elevated and it's like flying.I have checked the ESPILIT demo and it's
  3. I would like to be able to switch between ArcRotateCamera and FreeCamera with as little motion as possible. I haven't been able to figure out: 1) How to get the FreeCamera to face the same direction as ArcRotate was when switching. 2) How to remove the 'spinning' effect when switching. You can 'coil' a camera up by rotating it several times and after switching, it 'uncoils' itself by rapidly spinning. I thought that for FreeCameras this number is stored in .rotation.y and .alpha for ArcRotateCameras, but limiting these to ±Math.PI doesn't fix this issue. Don't rea
  4. Hi, there. How to make a FreeCamera rotate only by Alpha rotation? Only longitudinal? I want to turn off a Beta rotation (up and down rotation of camera). Thanks.
  5. Hi gang! Once before, I tried adding mousewheel to FreeCamera. I try again, for fun. http://playground.babylonjs.com/#6FHKHC#7 Watch console. Working okay, so far. But, you know, I would like mousewheel to move camera along direction vector returned-from scene.activeCamera.getDirection(BABYLON.Axis.Z) Currently, mousewheel moves camera along worldspace Z axis. If someone could fix line 33, so that camera moves along dir.z axis, that would be swell. Thanks! For a longer-term solution, does anyone think it would be wise/useful... to add babylon.freeCameraM
  6. So I have a ArcRotationCamera that is fixed on a target sphere. When I click a different sphere, I would like to animate the camera to move to and zoom in on the new target. Unfortunately I haven't been able figure out how to smoothly animate ArcRotateCamera switching to a new target like that, so my solution so far has been to switch to a FreeCamera, which I can then animate to the new target, and afterwards switch back to the ArcRotateCamera on the new position. Unfortunately the perspective is bugging out and is very janky to say the least. Basically the camera should turn towards the
  7. I'm getting the freecamera values but they are radians and if i continue rotate they increase more than 6.28 or less than -6.28 . So whay i do for conversion actually is: (camera.rotation.y*360)/6.28 So i get the camera values as i want. But i can figure how fix the infinite rotation value thing, maybe there is some function or something i missing to avoid that?
  8. Hey everyone ! Yesterday, I tried to upgrade my scripts to the the latest version but I found a little problem I think. When I increase the FreeCamera speed, the sensibility or sensitivity (I don't know which word I should use) just goes wrong So I recreate the problem here : https://www.babylonjs-playground.com/#THZIQ2#1 Can someone tell me what can I do to fix this problem ? Thank you in advance!
  9. Hey guys, is there a posibility to fix the FreeCamera's position. So the camera won't move on key-press. I just want to rotate the camera on key-press. Thanks in advanced Benji
  10. Hi all, Update - 17 / 02 mesh.collisionGroup = maskNumber; have been added to AbstractMesh. Two new properties, collisionGroup and collisionMask, have been added to AbstractMesh, collisionMask have been added to FreeCamera, and is coming with 2.6. Why? What do they do? The collisionGroup & collisionMask checks whether a camera Vs mesh or mesh Vs mesh collision should happen. Thus, it allows us to customize collisions, enabling us to decide what meshes should collide with each other and which meshes should collide with the camera An example could b
  11. Hi all I have a free camera which has a mesh which in front of it which is 70 cm wide (x) and 110 cm length (z) with it's pivot point at the its center. Now I want this mesh to be constantly in front of my free camera when the camera is moving. The problem starts when I start to rotate the camera. I want the mesh to be in the center of the screen (in the direction of the camera) and at a fixed distance from the camera. Is that possible? Does it involve complicated math calculations? Would a followcamera do the job? cart.babylon
  12. I'm using a FreeCamera, gravity,etc... and when i look at the sky and press W to go forward i go up and can fly, the same if i look at the floor and press back. I want that with WASD the camera moves without take the Y.rotation in consideration, because i still need to move the camera and rotate to look everywhere. How can i achieve that? I tried with "Camera.CamFrontX(Distance)" , Camera.DirectionX(AxisX, AxisY, AxisZ) ,etc... to fix the Y.Rotation value but never got the desired behaviour, sometimes the Y is limited and i can't climb ramps or stairs, other the collisions are
  13. Hello, I think I am not very well understood the function of the rotation properties on a free camera ... Watch this playground: http://www.babylonjs-playground.com/#HAAJ3#0 Why does my variable rot changed? I think I must be so tired to understand the problem If someone has an explanation for this problem thank you. Ps: It works very well with an arcRotatecamera by adjusting Alpha and Beta values. Thanks
  14. Hey Guys, I intend to change the use of arrow keys for FreeCamera. I want the camera to rotate around its axis when pressing the left or right arrow keys as opposed to its current movement to left or right. How can i do this? I tried setting noPreventDefault to false in camera attachcontrol but it dosent seem to stop the movement of camera left or right. Am i missing something here? Thanks
  15. I am trying to capture a FreeCamera's location and pan angle or rotation so I can reposition the camera later with the exact same view. (I am working with the playGround Collision example) I seem to be able to get camera.position.x, camera.position.y and camera.position.z ok but camera.cameraRotation.y just yields zero every time
  16. Hello, I've been adding features to my game, and came across a weirdness that I don't know how to explain! I've created the basis for my question here. There are a number of objects in the game scene, and I want the player to be able to choose one to look at. I am using the FreeCamera, since it suits my purposes. After adapting the TargetCamera.setTarget function to return the rotation vector of a camera without setting its target explicitly, I can now create an easing animation which gracefully orients the camera in that direction. The link above demonstrates this working in a
  17. Hi there, I'm having a problem getting a playground sample to work on my xampp localhost, I got the Zip file of the Collisions example from the playground (http://www.babylonjs-playground.com/# -9 Collisions), the freecamera works perfectly when I run the online example, but when I test it on the localhost, the camera won't move at all, it will rotate with the mouse, but will not respond to my arrow key presses. Can someone explain why does the example works online and not on local ? Update: When tested using Internet Explorer, it works, but does not work using F
  18. Hello, When I am using free camera and attached controls, camera is falling only for about 1 second and than stops. I have to press control key to begin falling again. Can increase this duration or give camera instruction to fall (something like moveWithCollisions )? http://www.babylonjs-playground.com/#21AD8N Thanks!
  19. Hera is an example, http://www.babylonjs-playground.com/#1BKDEO#43 I created two worldspacecanvas named canv1 and canv2, In the beginning, canv2 is over can1, but canv2 will be under canv1 when canv2.position is reset. It happens on using FreeCamera, AcrRotateCamera is no problem. Is it a bug ? @Nockawa
  20. Hi All, I want to move(Like animation without pressing keys) Freecamera in a uneven path (vector3 array). For ex: I think the same question has been asked in our forum by other people. and i searched in some of the threads and in BABYLONJS Animation tutorial also, but it was like Start point and end point.using animation we can move from one point to another point. i have implemented TweenLite for moving camera, it is working but the the movement is smooth . but i want to move camera automatically in a series of provided vectors(vectors array) like animation.
  21. Hi, i don't know whether is this is a bug or not (or)i don't know whether other people experienced this behavior . when i press and hold back button while looking at ground the frecamera jumps into air and slowly it drops down. for example: take flat2009 look at ground . Click and hold back button camera jump sand touches the roof after that the camera start dropping slowly.
  22. Hello, I want to make a target camera since 3d software with a aim constraint between camera and is target and animate . This camera rig is better for me to animate because i do not have to animate the rotations. To do this i use scene register before render like this: http://www.babylonjs-playground.com/#1ICOZQ#0 Do you know if he would have a better solution. Thanks
  23. I have an application where I have an FPS like camera that moves around a scene. I want to be able to use a camTo function to move the player around the scene. I have a position v3 and target v3. If I do not have a rotation value, the camera is not looking at the target. Is there a way to calculate the rotation knowing the position of the camera and the position of the target. Is my approach to this incorrect? How do I correctly move my freecamera to the correct location and ensure that it is looking at my desired target?
  24. Hi, I'm trying to figure out how to rotate a FreeCamera on Z axis without using a handler. In this example http://www.babylonjs-playground.com/#1CEZ5W#0, I only can rotate the camera using the handler. You can comment/uncomment the rotation lines in the renderLoop in order to see the difference. Do you understand what I want to show ?
  25. Hi, I am using Freecamera for my scene, i want to rotate ,i don`t want to move how can i restrict the movement only rotation has to work.
  • Create New...