(newbie) group2D rotation issue

Hi all, I am learning with a project to simulate a car with steering.
I have the wheels as rectshapes, they work fine, I can rotate them.
I built the frame with 7 ‘nodes’ indicating the corners of the car, each node is an ovalshape and I have grouped them in a group2D along with the wheels.
Now the problem…

I want to rotate the whole ‘vehicle’ (ie the group2D called ‘car’) and also to move it about on the canvas using sliders to change the origin of ‘drawing the car group2D’.

Problem is that if I rotate the items inside the group2D and then move the origin in a single axis, it is fine on the X axis but on the Y axis it moves at an angle… (in both axes even though the X axis value is static).

I can rotate the ‘wheels’ (rectshapes) and the ‘car’ can be shifted X or Y no problem, but if I rotate the ‘nodes’ (frame of car), the XY slide rotates too.

It’s that last bit, I would understand if both axes rotated but why only one?

Seems like abug since here

Is being said that rotation is around it’s anchor point (center).

Can you output the x,y values of all the objects and make a new video showing them during the rotation?

More info here

Are you moving all the objects with these sliders (apart from the wheel rotation)?
I thought you should add all objects to the Group2D, and just move that Group, by its centre

I am sorry guys, thanks for answering…

I found out that I was not understanding how the origin point in the group works.

Was applying the slider offset to the group, which was fine but also to the content zero point (which is now rotated) on one axis, so that secondary movement was on a different grid!


I have a saying “When something really weird happened, it probably didn’t”…

Should listen to my own advice. Thanks again for reading.

Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.