# Rotate Clone around a point

## Recommended Posts

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

##### Share on other sites

5 minutes ago, Noyogi said:

1. the setPivotMatrix method

demo:

##### Share on other sites

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

##### Share on other sites

thank you for the quick reply i will look at the new pivot point options

thank you again

i looked at the demo and it looks great

thanks again

##### Share on other sites

@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.

##### Share on other sites

abow is me on github.

##### Share on other sites

thank you, thank you, thank you!!!!!!

you are awesome!!

##### Share on other sites

@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

##### Share on other sites

The pivot point is in local space.

##### Share on other sites

Cool

now I just need to learn the naming of clones and I should be able to setEnabled(false) the center one.

## 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.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.