Rotation animation always from the same point

Hello, my problem is that I want to make a rotation animation but it always rotates at the same point 0,0,0. How can I set another rotation point?

It seems like changing the rotation center does not work as expected at the moment. Our team has filed a bug and will release a fix soon.

Thank you @mathieu1, I await your response.

Hello @Jose_Antonio_OrdoƱez,

I created a CodeSandBox to showcase how this works.

As this solution is not as easy as I like it to be, we might add an additional component in the future. But for now, I hope this will help you out.

Cheers, Michael

1 Like

Hello @MajorMeerkatThe3rd, thanks for your response.

My problem is not solved like this. I attach a video so you can see what my problem is. It does not rotate me with respect to its points if not on 0,0,0.

1 Like

Hello @Jose_Antonio_OrdoƱez,
I think the solution to you problem requires some calculation on where the point of rotation is, respective to the model. In your case, it seems like you have to adjust this point by the translation that was made from the origin of the model.

Feel free to create a CodeSandBox for us to reproduce this problem. Debugging from a video is not always easy as bugs or issues might be hidden.

Hope this helps.
Cheers, Michael

Hello @MajorMeerkatThe3rd ,
I have not been able to create a codesandbox because it does not let me add more global domains. I have created a codepen that also has the same error.

Hello @Jose_Antonio_OrdoƱez,
so what should be the happening in your example?

Hello, Let each door rotate through its point of rotation. The door on the right would have to open to the right and instead of 0,0,0.

I have left comments in the project with the door and the rotation point which is.

This works as in the example I provided you. I implemented the changes in your code, seems to work as youā€™d expect!

Hope this helps!

1 Like

Thank you very much!!!

Hi @MajorMeerkatThe3rd :vulcan_salute: :nerd_face:

I have the same problem but the ā€œDoorā€ consists of various geometries (glass, face, sides, handles). Please see the example of the Grasshopper and image bellow (29.1 KB)

I tried to use your code with my ticket by changing the ā€œpuertasā€ element to my ā€œDoorā€. But an error appears "Uncaught TypeError: Cannot Read Properties of Undefined (Reading ā€˜Pivotā€™).
ā€œWooddoors_AnimationDataā€ is a line or point you are creating in Grasshopper and the JavaScript code is using to rotate the Door?

Hello @pvilarim ,
this seems to be an issue with your model. I just had a look at the content of the output woodDoors_animationData and it simply just this:
data: "" format: "data" name: "woodDoors_animationData"
so an empty data property.

In the example above, the data contained a property called pivot which was a point that was sent from GH.

Hope this helps.

Cheers, Michael

1 Like

This doesnā€™t work anymore?

@Jose_Antonio_OrdoƱez Fixed! Thanks for letting us know.

Hello @MajorMeerkatThe3rd, how can I make the door stay fixed once the turn is finished in that position? As you can see, it goes backwards. I add Codesandbox

Hello @Jose_Antonio_OrdoƱez,
this was a bug. Fixed on 2.0.12!

Hello @MajorMeerkatThe3rd , Thank you very much.