R_RotateForEntity in F# (partially working correctly).