wayan Posted April 30, 2016 Share Posted April 30, 2016 Hi all, I'm still beginning on learning how to use babylon js, so for now i just playing a little with babylon playground. right now i just make play ground to combine example of using extention .obj loader and function of drag and drop at default babylon playgorund sample. the play ground i make is working (what i mean is the drag & drop is function and the .obj file is loaded) but i found something funny here, how to fix it maybe : - the ground(camera) can't rotate if i not drag and drop any object before - the .obj file why is it so small, is there a way to make it bigger like the example of using .obj loader ? - when i try to drag the 3D object, the object separate like : when i click and drag "bane" i just drag their 3d feet, body, head or cloth differently, not all full body of the 3D object and it looks quite funny to see it I wonder how to fix this. here my playground : http://www.babylonjs-playground.com/#HV0EA thanks alot, wayan Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted April 30, 2016 Share Posted April 30, 2016 Hello! you need to first attachControl on your camera to be able to rotate freely. I also updated your playground to zoom your objects: http://www.babylonjs-playground.com/#HV0EA#1 Quote Link to comment Share on other sites More sharing options...
wayan Posted April 30, 2016 Author Share Posted April 30, 2016 @Deltakosh Hello Delta, Thank you very much for update my playground, it's solve my two problem but as the other issue about when i drag the 3d, it's not full 3d that got move and dragged but they got separated, is there a way to fix it too...? so when i want to drag its not got separated (full body of batman, penguin or bane) not their legs, head or costum maybe. i give some screentshot about what i mean thanks alot Quote Link to comment Share on other sites More sharing options...
gryff Posted April 30, 2016 Share Posted April 30, 2016 Hi wayan Welcome to the BJS Forum. I downloaded your batman figure and took a look at it in Blender (see image below). As you can see it is made of 7 meshes - so when you click & drag on one of them - it comes apart. You have the option of taking the object file into a 3D program like Blender and merging the meshes - you end up then with just one mesh. Problem you then face is that you will now have to clean up the UV maps. cheers, gryff Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted April 30, 2016 Share Posted April 30, 2016 So happy to see you back Gryff!! Quote Link to comment Share on other sites More sharing options...
wayan Posted May 2, 2016 Author Share Posted May 2, 2016 @gryff Hi gryff, thank you very much for explain it to me, now i understand the problem is at the 3D figure. Quote Link to comment Share on other sites More sharing options...
gryff Posted May 3, 2016 Share Posted May 3, 2016 @wayan A thought on your problem wayan. Try this with just the Batman obj file: 1. Load the obj file 2. Then in your javascript code : var Batman = scene.getMeshByName("BatmanTorso"); Batman.isPickable = true; 3. Repeat the procedure for all the other parts except make all these other parts "unpickable" and then parent them to the Batman part, so for example: var mask = scene.getMeshByName("BatmanMask"); mask.isPickable = false; mask.parent = Batman; Hopefully clicking and dragging on the torso will move the whole dude around. cheers, gryff GameMonetize and Wingnut 2 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.