Jump to content

How to add Transform Gizmo


Recommended Posts

I've got a project where I'd like to add a transform gizmo for simple traslate/rotate/scale of objects in my scene.

I've been able to find this project - https://github.com/ssatguru/BabylonJS-EditControl which has all the featuers I want but it does not appear up to date and throw a lot of errors with the latest version of Babylon.

I was thinking then if I could just use the same feature from the editor and was wondering if anyone could give me guidance on that - how difficult would that be? What would be a good starting point?





Link to comment
Share on other sites

  • 2 weeks later...

@mr_pinc you can use the ManipulationHelpers extension hosted here: https://github.com/BabylonJS/Extensions/tree/master/ManipulationHelpers

It's a simple script to add and just follow the instructions from the project's homepage, you should be able to move/rotate mesh pretty easily if that's your goal.

Concerning scale, it's not so hard to add, it's the same internal mechanics as the translation but you apply the changes to scale instead. I currently don't have the time to do it, sorry, but I'm sure that many people will be able to.

Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...