the element on the pictures should be pivoted to back part of the opening and it works fine on in the editor (first 2 pictures) however in the game itself it rotates around itself and ignores the pivot point
#Why does rotation behave differently in the editor and in code/game
1 messages · Page 1 of 1 (latest)

How are you rotating it in the script
Part. Pivot = part.pivot * Cframe.angles(0,0,math.rad(90))
There is another problem where the part is not anchored to the rest of the tank when the tank is moved
We want to set the part's local / relative position and rotation
How should we rotate it so it rotates like if you used the rotation gizmo in the editor?
** You are now Level 1! **
I think you should probably do something a little different
Maybe a Motor6D so you can adjust the C0's orientation but it stays welded.
Or use an invisible pivot part, weld the door to the pivot part and the pivot part to the tank, and rotate the pivot
it's not possible to do it
Why not
no solution cares about the pivot point and just ignores it
If you want two objects to stick together, you'll need to use constraints, like welds or joints. It won't just magically stick.
Why not use a servo HingeConstraint and give it a target angle? Then you can put the attachment on the door and tank where the hinge should be
so illogical bruh
"illogical"?
I'm not sure why you think it's illogical
first time seeing a system like that
godot, unity and unreal make hierarchy and parent-child relationships matter
🤷♂️