Unexpected behaviour when rotating an ImmediateGeometry node in GDScript

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Mudley
:warning: Old Version Published before Godot 3 was released.

When setting an ImmediateGeometry rotation in the Inspector, it seems to behave normally, but when doing the same in GDScript, it tilts a little in an weird angle.

are you sure that you are using the same units(degrees and radians)

rustyStriker | 2017-07-07 15:32

Yep, here is a comparison, from inputing (-90, 0, 0) in the Inspector, and in GDScript respectively:

Inspector

GDScript

Mudley | 2017-07-07 17:04

well, usually the scripts use the radians units and the editor is set to use the degrees(weird isnt it?), try working with radians in the editor ( aka 2 Pi = 360 degrees and a 90 degree angle will be 0.5 Pi redians)

rustyStriker | 2017-07-07 17:27

That worked! Although I don’t get why they take different type of values, seems more logical to stick with one or another.

Mudley | 2017-07-07 18:25