Mekaboo Posted June 27, 2018 Share Posted June 27, 2018 Hello all, Since experimenting with BJS and using this forum I have learned a tremendous amount in such a short amount of time and Im very thankful of that?! Last night I came up with an idea of keeping things simple since Im new to the whole gaming arena. Still want to learn and create with the likes of Blender and Mixamo but so far BJS has been not only very helpful but extremely effective! Keeping things simple I took elements that I learned from Sirs @Deltakosh & @Wingnut and created a simple landing page. Taking code from this PG https://www.babylonjs-playground.com/#012I9K#3 I got the movement of the mesh but cant get my wording/logo to be upright even though Ive tried to tweak the z axis..how do I get my wording/logo looking right? Thank ya? Mekaboo index6.html Quote Link to comment Share on other sites More sharing options...
Wingnut Posted June 27, 2018 Share Posted June 27, 2018 Hi M! You are not providing many details, here. Is your wording/logo... a mesh? Or is it a GUI textblock? Or? I'll assume it is a mesh or many. Try rotating ALL axes, not just Z. Make sure you are rotating the PARENT or ROOT (top-most) mesh of the logo. Be sure to disable any :lookAt() or .billboardMode on the logo mesh. Those things can cause confusion. Sometimes, mesh.bakeCurrentTransformIntoVertices() is useful. Sometimes, do a rotation around an axis, then do a bake, then do more rotations, and maybe more bakes. Generally speaking, a bake... sets mesh.position to 0 0 0, mesh.scaling to 1 1 1, and mesh.rotation to 0 0 0, yet does NOT move/orient/scale the mesh. Sometimes handy. And, as always, if you can re-produce the same problem... using a playground scene... it will be MUCH easier for others to troubleshoot. Thx. Mekaboo 1 Quote Link to comment Share on other sites More sharing options...
Mekaboo Posted June 27, 2018 Author Share Posted June 27, 2018 It's a texture..I applied a .jpg image to sphere mesh. I'm going to test all of the ideas you gave me...will give update? Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted June 27, 2018 Share Posted June 27, 2018 Maybe Im in the wrong PG, but I see no texture or logo, just and offset spinning cube. Mekaboo 1 Quote Link to comment Share on other sites More sharing options...
Guest Posted June 27, 2018 Share Posted June 27, 2018 same here Mekaboo 1 Quote Link to comment Share on other sites More sharing options...
Mekaboo Posted June 27, 2018 Author Share Posted June 27, 2018 @Deltakosh and @Pryme8 I used the code that made the cube spin in the PG and added it to my code in my index6.html which I attached to my original post to show what I accomplished from using it....sorry about the mix up Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted June 27, 2018 Share Posted June 27, 2018 Index6.html we cant really view unless we install on a server. Im at work, where I do not have access to that. a screen shot or a PG would be better. Mekaboo 1 Quote Link to comment Share on other sites More sharing options...
Mekaboo Posted June 27, 2018 Author Share Posted June 27, 2018 I'll try to create a PG..sorry again Pryme8 1 Quote Link to comment Share on other sites More sharing options...
Mekaboo Posted June 27, 2018 Author Share Posted June 27, 2018 Discard Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted June 27, 2018 Share Posted June 27, 2018 Post that pg. Mekaboo 1 Quote Link to comment Share on other sites More sharing options...
Mekaboo Posted June 27, 2018 Author Share Posted June 27, 2018 I tried to run the PG and it won't allow me to run it unfortunately..do I need to rewrite it again? Is there a way to copy and paste code in PG? Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted June 27, 2018 Share Posted June 27, 2018 even if it does not run, hit save and post that link. Mekaboo 1 Quote Link to comment Share on other sites More sharing options...
Mekaboo Posted June 27, 2018 Author Share Posted June 27, 2018 Hello there is the PG that I created ? http://www.babylonjs-playground.com/#JQ802A Pryme8 1 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted June 27, 2018 Share Posted June 27, 2018 Stand by. Ill be back to you on this. Mekaboo 1 Quote Link to comment Share on other sites More sharing options...
Mekaboo Posted June 27, 2018 Author Share Posted June 27, 2018 (edited) SUPPERIFFIC!!! ??, Mekaboo Edited June 27, 2018 by Mekaboo add Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted June 27, 2018 Share Posted June 27, 2018 http://www.babylonjs-playground.com/#JQ802A#2 Your lights were missing their 'new' declaration. Mekaboo 1 Quote Link to comment Share on other sites More sharing options...
Mekaboo Posted June 27, 2018 Author Share Posted June 27, 2018 Thank you for all of your help @Pryme8it means alot! Im still however having trouble flipping my texture to so that my wording shows correctly..how do I do this? Thank ya?, Mekaboo Quote Link to comment Share on other sites More sharing options...
Mekaboo Posted June 28, 2018 Author Share Posted June 28, 2018 Since Im having a hard as hell time trying to get my image upright on the sphere mesh Im using the box mesh from the PG I posted earlier: https://www.babylonjs-playground.com/#012I9K#3 Been trying implement code to bring texture to it but when I load on server I get a white screen and errors. @Deltakosh, @Wingnut, or @Pryme8 know which material, UV or Standard material code to use for this mesh? Thank you?, Mekaboo Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted June 28, 2018 Share Posted June 28, 2018 You will need to upload your textures to a github account or something then use https://rawgit.com/ to generate a cors link for it. Use that link and you should be good to go on porting textures over to the pg. https://www.babylonjs-playground.com/#012I9K#4 Mekaboo 1 Quote Link to comment Share on other sites More sharing options...
Mekaboo Posted June 28, 2018 Author Share Posted June 28, 2018 THANK YOU SO MUCH @Pryme8!!!Actually I wanted to add this to my code for my landing page of my game and this PG did the trick? ???, Mekaboo 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.