Noyogi Posted November 30, 2016 Share Posted November 30, 2016 http://www.babylonjs-playground.com/#147HRL#5 Hello, hello, good day to you sirs and mams, I'm a newb, i'm a newb. I'll try and keep it simple and straight forward, at a minimum my playground is (simple and straight forward). when I search for pivot, three options seem to come up, along with confusion: 1. the setPivotMatrix method 2. create a mesh where you want your pivot point to be and parent to it 3. world this or that and setting world so, i've experimented with OPTION 1, setPivotMatrix, and i can't find the connection between this and a pivot point, I assume this is a mathematicians version of pivot as opposed to a physicists pivot, if someone could please describe in a sentence what setPivotMatrix is, it would be greatly appreciated. On the other hand if it could be shown in a simple playground that this has something to do with a "pivot" that to would be greatly appreciated. Before you say that's easy and show me a sphere rotating around another sphere where the pivot is the one rotating please read: from wikipedia: "Pivot may refer to: Pivot, the point of rotation in a lever system More generally, the center point of any rotational system Pivot joint, a kind of joint between bones in the body Pivot turn, a dance move" for OPTION 2 parenting it works great with a single mesh you want to rotate around a point, but will it work with clones and rotating each clone another Math.PI/6? here is my playground: http://www.babylonjs-playground.com/#147HRL#5 OPTION 3 is beyond me thank you for looking reading thinking, maybe even writing have a lovely day, or if night, then sweet dreams Quote Link to comment Share on other sites More sharing options...
adam Posted November 30, 2016 Share Posted November 30, 2016 5 minutes ago, Noyogi said: 1. the setPivotMatrix method The latest version of BJS now has setPivotPoint, getPivotPoint, getAbsolutePivotPoint. https://github.com/BabylonJS/Babylon.js/blob/master/src/Mesh/babylon.abstractMesh.ts#L1222 demo: http://www.babylonjs-playground.com/#WFLKH#6 Quote Link to comment Share on other sites More sharing options...
Noyogi Posted November 30, 2016 Author Share Posted November 30, 2016 not to obfuscate, maybe don't take this in to consideration for the above, but.. i have been using a work around based on my mesh is actually imported from 3ds max i create a sphere centered on 0,0,0 convert to editable poly detach a poly bevel that poly invert select then delete the extrude poly select border cap turbosmooth x3 iterattions sphereify now when i export, what used to be a face of a sphere with 0,0,0 center is now a sphere still with 0,0,0 center but with a position where the surface of the original sphere was located Quote Link to comment Share on other sites More sharing options...
Noyogi Posted November 30, 2016 Author Share Posted November 30, 2016 thank you for the quick reply i will look at the new pivot point options thank you again @adam i looked at the demo and it looks great thanks again Quote Link to comment Share on other sites More sharing options...
Noyogi Posted November 30, 2016 Author Share Posted November 30, 2016 @adam it says abow is responsible for this i tried @abow but no option comes up. is there a demo of the setPivotPoint, getPivotPoint, getAbsolutePivotPoint that is a little more basic? like the absolute minimum requirements to use the method. @wingnut have you used this? you seem to have a way with words. Quote Link to comment Share on other sites More sharing options...
adam Posted November 30, 2016 Share Posted November 30, 2016 abow is me on github. http://www.babylonjs-playground.com/#WFLKH#8 Quote Link to comment Share on other sites More sharing options...
Noyogi Posted November 30, 2016 Author Share Posted November 30, 2016 thank you, thank you, thank you!!!!!! you are awesome!! Quote Link to comment Share on other sites More sharing options...
Noyogi Posted December 2, 2016 Author Share Posted December 2, 2016 @adam sorry to keep pestering, but I can't seem to make this work with the clones. My goal is to advance each clone, Math.PI/6 around a center pivot of 0,0,0. http://www.babylonjs-playground.com/#WFLKH#9 I am surely just missing something, please assist. Thank you Quote Link to comment Share on other sites More sharing options...
adam Posted December 2, 2016 Share Posted December 2, 2016 The pivot point is in local space. http://www.babylonjs-playground.com/#WFLKH#10 Quote Link to comment Share on other sites More sharing options...
Noyogi Posted December 2, 2016 Author Share Posted December 2, 2016 Cool http://www.babylonjs-playground.com/#WFLKH#13 now I just need to learn the naming of clones and I should be able to setEnabled(false) the center one. 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.