Forum

> > CS2D > Scripts > Weird player rotation angle
Forums overviewCS2D overview Scripts overviewLog in to reply

English Weird player rotation angle

No replies
To the start Previous 1 Next To the start

old Weird player rotation angle

ize
User Off Offline

Quote
Hello, I'm new to cs2d scripting

Is cs2d player value for angle rotation
player(id, "rot")
is allowed you to have a value more than 180 degrees?
When I angle my cursor to the bottom-left, my value is 200+

1
2
CapRotation: -90.727569580078
CS2D Rotation Value: 269.27243041992

I'm using this script to fix the angle position for my script
1
2
3
4
5
6
7
8
9
10
11
function CapRotation(rotation)
  rotation = rotation % 360

  if rotation > 180 then
    rotation = rotation - 360
  elseif rotation < -180 then
    rotation = rotation + 360
  end

  return rotation
end

But, some script that published/uploaded to unreal software is bugged caused by player rotation angle (maybe), for example file cs2d LaserMod

Or is it normal to have more than 180?
Thanks!
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview