I have a problem with my Gizmo tool when I set width+ height of my canvas in % and not with px

Hey there,
So I have a problem to select my axis of my gizmo when I set my width + heigth in “%” in my css and not in “px”. It’s more complicated to select the axis than before when my canvas was in “px”.
Do you know how to fix it without setting my width in “px” ^^ ?

I don’t have playground to show you, but I set width=80% and same for heigth.

Thank you for your time.
Mathieu

Hi Mathieu,

Sorry, I think some more information will help me understand what’s going on here. A Playground would be ideal; but in the absence of that, is there a screenshot or code snippet or something that might help me learn more, especially about what’s meant by “complicated to select”? Thanks!

Hi,
So I have made a code for a VR visit tour. At the beginning I have a page where I can create the visit. And so I have a function where I can positionning the hotspot. The gizmo tool works fine to moove the hotspot when I set the width and height of my canvas in “px” like “width: .600px” etc… But it’s not a “responsive” canvas.
So my issue is : When I make my canvas “responsive” by setting “width:90%” for example, it’s harder to select the axis of my gizmo tool. It’s like my mouse doesn’t select the axis when it is on it. I will try to do an example on my github to show you.

It’s weird, its works fine on my github but not on my project… And I can’t share you my company’s project So I guess I will have to find out by myself

Try to call engine.resize() before to add Gizmo to your scene. Is just a sugestion.Cheers!

2 Likes

It’s like I can’t choose the axis. That is my github: https://mathieuboutin.github.io/

In my github I don’t have any problem, but on my project with the same code, it’s like My mouse doesn’t recognize the axis.

@Wingnut, @Deltakosh @syntheticmagus. I will try to take a video only of the canvas and show you.

this is my video, hope you will see my issue : look at the color of axis, it didn’t change so I wasn’t able to moove my hotspot.

My video: VID_20190926_100559.mp4 - Google Drive

And sometimes, I can select the axis “red” when my mouse is a little bit above the axis. It’s look like the pointer is weird.

thanks a lot ! :slight_smile:

1 Like