i have for example a specific degree (157.5) (as far as I understood, it can be between -180 to 180). alt:V uses radians, so this degree must be converted to radians in order for the rotation to be correct.
i use new alt.Vector3(157.5, 0,0).toRadians() which returns this value: Vector3 { x: 2.748893571891069, y: 0, z: 0 }
however, when I try to set this radian to a LocalObject, it just doesnt set it to that value, because it is probably out of bound (as you can see the X value is 0.39..., even if its value should be 2.74...). when I het lower radian values, it sets the rotation corectly, but when I get higher radian values, it just doesnt work.
this lower value for example, applies correctly:
basically, the max value in radian should be 3.14
for (let i = -180; i <= 180; i++) {
alt.log(i + " " + new alt.Vector3(i, 0,0).toRadians());
}
using this code object.rot = new alt.Vector3(3.12, 0, 0);, this is the result:
[X] By submitting this ticket, I affirm that I have verified the presence of this issue on the latest developer version available at the time of writing this ticket.
Description of the problem
i have for example a specific degree (157.5) (as far as I understood, it can be between -180 to 180). alt:V uses radians, so this degree must be converted to radians in order for the rotation to be correct.
i use new
alt.Vector3(157.5, 0,0).toRadians()
which returns this value:Vector3 { x: 2.748893571891069, y: 0, z: 0 }
however, when I try to set this radian to a LocalObject, it just doesnt set it to that value, because it is probably out of bound (as you can see the X value is
0.39...
, even if its value should be2.74...
). when I het lower radian values, it sets the rotation corectly, but when I get higher radian values, it just doesnt work.this lower value for example, applies correctly:
basically, the max value in radian should be 3.14
using this code
object.rot = new alt.Vector3(3.12, 0, 0);
, this is the result:Reproduction steps
Expected behaviour
The specific value should be set.
Additional context
No response
Operating system
Windows 10
Version
16.0.143
Crashdump ID
No response
Confirmation of issue's presence