lavokad Posted August 2, 2015 Share Posted August 2, 2015 Hi. I've just started playing with babylon.js and one of the things I'm trying to do is set the camera like in Diablo game.So, I edited one example in playground disabling attachControls, and then seting the event handler for click event, so that on every click camera is moved foward by 1. My question is: there is no member called position neither on FreeCamera class, nor on Camera, nor on Node. Where is this property then? Position is one of the parameters for contstructor, but I can't see it as a member/property of camera object/class. So why does this work at all? Also, is would this be the correct way to implement this type of camera (moving it backwards/foward, right/left as the user will move the mouse to the screen edges). Edited playground example Thanks a lot in advance! Quote Link to comment Share on other sites More sharing options...
Wingnut Posted August 3, 2015 Share Posted August 3, 2015 Hi lavokad, welcome to the forum, good to have you with us. Your click to move cam is working nice. There have been quite a few experiments with moving cameras and moving mesh... with clicks or mouse-overs. I have never played Diablo... but if you describe the type of movement you are wanting, we all can help you accomplish it, gladly. Personally, I like WASD keys, and I also like a mouseover system that some us threw together... http://playground.babylonjs.com/#TTLMJ#3 (the four border panels can be made completely invisible, as wanted). Anyway, hope these things help, and again, please describe what you want, because not all of us know what Diablo cameras are like. Be well. Quote Link to comment Share on other sites More sharing options...
iiceman Posted August 3, 2015 Share Posted August 3, 2015 Wouldnt a Diablo like camera be more something like that: http://playground.babylonjs.com/#1NQTNE#25 ? Quote Link to comment Share on other sites More sharing options...
Temechon Posted August 3, 2015 Share Posted August 3, 2015 Or a pane camera maybe ? http://playground.babylonjs.com/#TTLMJ Quote Link to comment Share on other sites More sharing options...
Wingnut Posted August 4, 2015 Share Posted August 4, 2015 hehe... there's an echo in here. Temechon 1 Quote Link to comment Share on other sites More sharing options...
lavokad Posted August 4, 2015 Author Share Posted August 4, 2015 Hi, guys thanks a lot. I'm embarrassed I didnt find the azure docs site. I was browsing here: http://www.sokrate.fr/documentation/babylonjs/BABYLON.FreeCamera.html and didn't find the member property or maybe I was just blind Thank you all for demos in the playground! iiceman, this is the diablo camera + following , cool Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted August 4, 2015 Share Posted August 4, 2015 Ok, so, for punishment for your embarrassment, you must promise to tell us about your ideas and projects, and share cool things you discover. Even share the simple things. If you are excited over something, anything, then we will be, too. By the way, I have accumulated over 40 on-forum embarrassments, so, you have some catching-up to do. Good to have you with us... I like your personality. Keep hanging-out with us if you can, and tell us about you, a bit, if you want. This very-active forum has some great artists, storytellers, experimenters, techies, innovators, and mad scientist goof-balls. I think you'll fit right in, Lavokad. iiceman 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.