Forum

> > CS2D > Scripts > Players rotation
Forums overviewCS2D overview Scripts overviewLog in to reply

English Players rotation

2 replies
To the start Previous 1 Next To the start

old Players rotation

J4x
User Off Offline

Quote
Hi i have a question here, does the player rotation is checked in pixels?

old Re: Players rotation

Flacko
User Off Offline

Quote
Player rotation in CS2D is measured in degrees.
Lua's standard library uses angles in radians instead.

To convert an angle from CS2D degrees to standard degrees:
1
2
3
cs2d_angle_to_std(x)
	return math.rad(x-90)
end
If you want to do it the other way:
1
2
3
std_angle_to_cs2d(x)
	return math.rad(x+math.pi/2)
end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview