How to add the ability to rotate the scene to the webgl_interactive_voxelpainter example?

Is there any simple example to rotate a 3D object just like 3DS Max?

Do you want to rotate the entire scene or just a selected 3D object?

2 Likes

I want to rotate the painted blocks and the underlying grids, such that I can view the blocks from different perspective and add a new block easily if the target position is behind the painted blocks.

I made a simple rotation version which can rotate by y axis, but currently after rotation, I cannot add or remove blocks correctly.

Please put a fiddle together. It’s much easier to test your stuff in this way.

1 Like

Thanks for your kind help.
Finally I made a workable version as fiddle.

The main changes include point and surface normal rotation by y axis and the method to sync the rotations between old voxels and the newly added voxel.

Your advice and comments are warmly welcome.

1 Like