al404 Posted August 10, 2016 Share Posted August 10, 2016 I would like to set the particle fountain in fixed position inside the scene so vien if i zoom in / out or rotate the scene buy fountain should remain in the same place, center bottom of the scene i try to attach the fountain to the camera but in can't be exactly in the same position since it should have a fixed distance from the font of the camera i edit this playground adding scene.registerBeforeRender(function () { //fountain.position = camera.position; fountain.position.x = camera.position.x-13; fountain.position.y = camera.position.y; fountain.position.z = camera.position.z; }); http://www.babylonjs-playground.com/#1AKAXK#1 Quote Link to comment Share on other sites More sharing options...
DigiHz Data Posted August 10, 2016 Share Posted August 10, 2016 Maybee you can use @Dad72's function for this. (getFrontPosition (distance) to place an object in front of the camera and whatever the rotation and position of the camera). selected_entity.position = scene.activeCamera.getFrontPosition(2);//put selected_entity 2 units in front of the camera. Dad72 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 10, 2016 Share Posted August 10, 2016 Here is it: http://www.babylonjs-playground.com/#1AKAXK#2 al404 1 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.