Forum

> > CS2D > Scripts > Players rotation
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Players rotation

2 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Players rotation

J4x
User Off Offline

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

alt Re: Players rotation

Flacko
User Off Offline

Zitieren
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
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht