kyptov Posted May 2, 2017 Share Posted May 2, 2017 http://playground.babylonjs.com/index.html#WP0JL8 I can rotate camera, but cannot move. `camera.cameraDirection` is changing, but camera position is not. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted May 2, 2017 Share Posted May 2, 2017 I noticed that too before 3.0, but with an ellipsoid. The movements are then increasingly slowed down, as if gravity was growing stronger. I do not know how to explain, but I stop using workerCollisions because of it. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 2, 2017 Share Posted May 2, 2017 Does it work without workerCollisions? Quote Link to comment Share on other sites More sharing options...
Dad72 Posted May 2, 2017 Share Posted May 2, 2017 Yes for me. Quote Link to comment Share on other sites More sharing options...
kyptov Posted May 3, 2017 Author Share Posted May 3, 2017 12 hours ago, Deltakosh said: Does it work without workerCollisions? Yes, http://playground.babylonjs.com/index.html#WP0JL8- if to comment line 4 - it moves. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 3, 2017 Share Posted May 3, 2017 Ok I'll create an issue then Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 3, 2017 Share Posted May 3, 2017 Actually it is not an issue Starting with 3.0, if you want workers you need to reference babylon.worker.js Quote Link to comment Share on other sites More sharing options...
kyptov Posted May 4, 2017 Author Share Posted May 4, 2017 I digged a little and found that camera.getTarget() returning previous value (all collision disabled including worker) I use next code to move camera forward on custom event in requestAnimationFrame and camera not moving. const vec3 = camera.getTarget().subtract(camera.position); vec3.normalize().scaleInPlace(MOVE_SPEED * frontward); camera.cameraDirection.addInPlace(vec3); I localized moving only to Z axis and logged z values console.log(camera.getTarget().z, camera.position.z, camera.getTarget().z - camera.position.z); and here the log -13999 -14000 1 -13999 -13990 -9 -13989 -13991 2 -13990 -13981.9 -8.100000000000364 Camera is moving, but forward and backward. Looks like camera.getTarget() returning previous value. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.