Jump to content

Gizmo bug


Dad72
 Share

Recommended Posts

@trevordev I have some problem to make gizmos work properly.

2 Problem on this PG.

- When we select the model, and we slide it does not go in the direction of the arrow, but to oppose it.

- When we want to change mesh, has a problem with dispose() is undefined

On my project I have another problem that is when I select, it does not slip, it slips when I release the mouse. I did not manage to reproduce it on the PG but on my project I do not do anything particular for that to happen and I do not know why.

http://playground.babylonjs.com/#8GY6J8#80

Link to comment
Share on other sites

@Trevordev 

Another problem is when an object is rescaled smaller, the object moves in extremely slow ways.

Moving the focus from one end to the other of the screen the object was moved by 0.1 unit.

For the problem 1 cited above, it may be because of the model or coordinate x are invert (I guess).

http://playground.babylonjs.com/#8GY6J8#88

Link to comment
Share on other sites

Thanks for catching these :) , I missed some local/global logic in these cases (all gltf files are imported with a -1 scale transform node at the root) and had a refactoring error for that dispose issue. These should be fixed by this PR: https://github.com/BabylonJS/Babylon.js/pull/4868. Sorry for the delay on the fix. Let me know if you are still seeing issues or find anything else.

Also as a side note, I'm not sure if your main code is like the playground but you can see how loading that factory gltf causes multiple meshes that can be clicked/interacted with that are children. If that is not what you were expecting you could try using the MakeNotPickableAndWrapInBoundingBox function see: http://playground.babylonjs.com/#8GY6J8#94

 

Link to comment
Share on other sites

Thanks @Trevordev.  

I would check for dispose () when it will be merged.

On my project I also have the problem when I click on the gizmo, I can not move it while remaining to press, it moves only when I release the click of the mouse. Do you have any ideas of what can cause this?

Thanks again

Link to comment
Share on other sites

Cool, PR (https://github.com/BabylonJS/Babylon.js/pull/4871), there was a bug in the advancedTexture class when blocking pointer events. I also noticed in the playground there is a lot of disposing happening on every click, you can hide the gizmoManager by setting attached mesh to null to avoid having to worry about keeping its state between dispose/recreation. See http://localhost:1338/Playground/index-local.html#8GY6J8#106 after the PR is merged. Thanks!

Link to comment
Share on other sites

It's good now @trevordev. I still have a small problem (not a bug) but rather compared to the size of the gizmos. They are hardly selectable.

- Can you increase the scale of gizmo, Or allow us to be able to increase it. I'm talking about the general size not the thicknesses.

_scaleFactor = 3;
_scaleFactor = 4;


- The thickness may be also slightly too small. It should increase a little bit, but not too much.

scaling.scaleInPlace (0.2);
scaling.scaleInPlace (0.26);


- And the hovers also do not see much, could not it be much brighter, more alive.

hoverMaterial.emissiveColor = color.add(new Color3(0.2,0.2,0.2));
hoverMaterial.emissiveColor = color.add(new Color3(0.3,0.3,0.3));
hoverMaterial.specularColor = color.add(new Color3(0.3,0.3,0.3)); Or something else to make the hover more brilliant

After three little things, it should be perfect and functional.

Thanks Trevor

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.

Guest
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.

Loading...
 Share

  • Recently Browsing   0 members

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