nunuStudio icon indicating copy to clipboard operation
nunuStudio copied to clipboard

Whether to consider adding damping propertyto the orbit controls object in nunustudio?

Open sherry-min opened this issue 4 years ago • 5 comments

Hi, I found the orbit controls object in nunustudio has no damping property. Because is too laggy in my NSP file, orbit controls has no damping property, and the screen will jam when the mouse scrolls. Whether you will consider adding damping property so that the mouse operation will be more flexible. If not, I want to know how to use three.js orbitcontrols in nunustudio, because I found that THREE in nunustudio has no OrbitControls property. Thanks!

sherry-min avatar Jun 19 '20 08:06 sherry-min

Hello

I can add the damping property to the orbit controls object it actually does have it internally i believe its just a matter of exposing it on the GUI.

To use orbit controls from THREE you can download the OrbitControls file and import it into the editor as any other script. Check the tutorial page for more details. https://nunustudio.org/learn/basics/02_script/page.html https://nunustudio.org/learn/basics/19_terrain/page.html

Thansk a lot!

tentone avatar Jun 20 '20 08:06 tentone

I was just checking and the orbit controls already have a "friction" attribute that should behave similar to what you would expect from a damping attribute.

I probably should rename it, since damping does make more sense.

tentone avatar Jun 20 '20 08:06 tentone

Thank you for your quick respond. I have tried to use orbit controls from THREE according to your suggestion. It turns out that you are right. It is just a matter of exposing it on the GUI. Do you have any good suggestion to solve the problem that the screen will jam when the mouse scrolls?

sherry-min avatar Jun 22 '20 08:06 sherry-min

I have another question need your help. What is the best way to add a label for model that can display some important informations in nunustudio. As the 3D scene rotates, the label always faces the user. Similar to attachment. image

sherry-min avatar Jun 22 '20 09:06 sherry-min

For the scroll problem it is a bit tricky because either you jam the scroll to get croll events without the scene getting out of place or you scroll the window freely without locking to the scene canvas.

For the text you can use Sprite Text that always faces the camera automatically.

Thanks a lot!

tentone avatar Jun 22 '20 21:06 tentone