Rotation trouble
Veon started this discussion in Bug Reporting

Hey Scrubs, starting from today I feel some troubles rotating in the workshop space with the left-mouse button. Maybe did you change something?

12 replies · Page 1 of 1
Avatar of Scrubs
Administrator

Yes, I added the support for the orthographic projection (you can now switch between perspective & orthographic) and therefore I changed the way the camera is handled.
Besides, I updated the camera controls to give more freedom - especially when working under. You can view your model upside down which wasn't the case before.

This was a very heavy update of the code and therefore there might be some bugs remaining. I tested with Safari, Firefox and chrome on MacOS and it was fine. I'll try tomorrow from work on my PC lol

What kind of issue do you have?

Rotation used to be locked to a single axis. Scroll + Left Click left or right, the X axis would be altered. Scroll + Left Click Up or Down, the Y axis would be altered. With the new update, both the X and Y Axis are altered simultaneously making it extremely difficult to navigate around the environment.

Please Scrubs, together with the new two prospectives (orto & persp), can you add the old mouse camera control too?
It's really hard for me now using the editor now, specially when I have to rotate around an object!
Thanks

Avatar of Scrubs
Administrator

Hello I don't really understand what is the issue. I built quite a few things in the last couple of days and it was fine. It basically works the same way except that you have more freedom. Maybe it is because I'm used to 3D software. Would you be able to do a short video on how you get in trouble?

Unfortunately, it is not that easy to add the other type of control - whose code was pretty bad anyway. I won't have too much time to go back to my maths in the next month or so - I'll be away from end of april until mid-may. I'll probably look into adding control options after that time.

Edit: Just got an idea. I shall be able to add the other type (Turntable controls) only on the perspective camera. I don't promise anything but I'll try that this week.

Avatar of Scrubs
Administrator

Well, I finally found a way to implement a new version of the turntable controls and make them work with the perspective and orthographic cameras.
I also put it back as the default controls.
You can switch between the 2 modes - Turntable and Trackball - using the numpad key 9 or with the camera menu.

There shall be enough for everybody to be happy now 😛

It's almost 1am so time to go to bed...
It's probably the last main feature coming in the workshop over the next month. I'll be heading to Japan soon!

I sometimes have it too. Like when you're changing the X-axis to 90°, the Z-axis get modified as well.
My Iconic Pencil Pot build has an example of this bug. I have a lattice on the left of the house and when I change the Z-axis to 90°, the X-axis get modified to 90° and I'm unable to change the Z-axis correctly.

EDIT: This looks to be another bug.

Here is the video you requested. You will see how the MF model slowly rotates in a strange fashion as soon as the video starts. The new features you've added allow me to reset the problem but eventually I can make the bug come back. Based on my testing, I think this issue is (now) limited to only one specific view. I'm just unsure of which view is the culprit.

https://youtu.be/m7KMd-3bhf4

I should also note that the Camera mode text in the upper left hand corner may be bugged as well. Over time, I noticed that the text stopped matching the options listed in the pulldown menu. Ultimately, the text ended up displaying a combination of both camera view options. The video should show this as well.

Avatar of Scrubs
Administrator

Hi,

Thanks for your video and going hard on it - it's the way to find things that are not quite right.
It is hard to see what's wrong on the video though has it is more something that you feel when controls are not behaving quite right.

I know that the code for trackball is not perfect in some cases:

  • Select top view when you are in the Turntable mode and switch to Trackball mode.
  • Camera is looking at the model from under in Turntable mode. In some cases, switching to Trackball will be an issue - It shall be this case that you experience.

There is an issue with the up vector of the camera in the trackball mode.
In turntable mode, this up vector remains (0, 1, 0) so it is easier to handle. In trackball mode it could be anything and the code is in trouble for some combination of position / rotation / up vector of the camera when assigned randomly. In practice it sometimes doesn't like the (0, 1, 0) up vector when you switch from turntable to trackball.

My understanding is that the Turntable mode works fine for you?

For the text in the top left corner, I don't think I saw it in your video - maybe in the middle, it looks like you change from ortho to perps and it stays in ortho mode, but i'm not too sure. I just tried to go hard on it - keeping the numpad keys 5 and 9 pressed - but it did not managed to make it crash. Let me know if you manage to find a way to repeat this issue.

Dang, I was hoping the video would help you understand the issue I am seeing. The first 15 seconds of the video is the bug. Rotating the mouse in circles as I hold down the left mouse button causes the nose-end of the Millennium Falcon to slowly rotate clockwise. Before you added distinct camera modes (Ortho, Persp, Trackball and Turntable) this problem always occurred. Now, it only seems to happen in Persp|Trackball mode.

For what it's worth, I never use the keyboard shortcuts to change the view, only the pull-down menu. I'm not sure whether this has any effect on the behavior I am seeing.

Edit: Also, yes, Turntable mode seems to be working fine. I spent some time working on my model in Turntable mode and didn't run into any issues.

Avatar of Scrubs
Administrator

Hello,

I think I understand what you mean now 😉 Yes the model slowly rotates when you do circles with your mouse (perspective or orthographic).
I tried with SolidWorks - my work modeling tool - and it produces exactly the same behaviour. So on that basis I would say that it is nor really a bug.

I also tried with the menu as well but it was ok. The code is exactly the same anyway so it shall not make any difference. I also had a quick review of the functions but I did not manage to find anything weird or that could cause the issue so far. Please let me know if it re-happens and how.

I think what would be a good idea is a control to tilt the camera.

Avatar of Scrubs
Administrator

I started to work on the support of the 3D mouses from 3Dconnexion for the lucky people who own one.

Advertising
5 participants
Avatar of Veon
Avatar of Scrubs
Avatar of DaPhatty
Avatar of Sim
Avatar of UltraHex

LEGO, the LEGO logo, the Minifigure, and the Brick and Knob configurations are trademarks of the LEGO Group of Companies. ©2024 The LEGO Group.

Mecabricks, the Mecabricks logo and all content not covered by The LEGO Group's copyright is, unless otherwise stated, ©2011-2024 Mecabricks.