Rotate Object At End Point

Hi everyone,

I am new to three.js, and have been using it to build a tool for designing roof trusses. I have most of the tool complete, but one thing is proving really difficult for me to get my head around.

In the image I have included, you can see a beam (green arrow); now obviously this object rotates around its centre point, and no matter how many different approaches I have tried, I just cannot get it to rotate at the end of the beam marked with the red circle.

If anyone can provide some guidance I really would be most grateful…

Cheers,
Paul

truss

You can work with an additional pivot object like in this example: https://jsfiddle.net/f2Lommf5/3594/

This approach allows you to change the pivot point as you like. You can also translate the geometry but this will modify the position of all vertices permanently.

4 Likes