1 package cz.cuni.amis.pogamut.udk.utils;
2
3 import cz.cuni.amis.pogamut.base3d.worldview.object.Velocity;
4
5
6
7
8
9
10 public class UnrealUtils {
11
12
13
14
15 public static final double CHARACTER_COLLISION_RADIUS = 25;
16
17
18
19 public static final double CHARACTER_COLLISION_HEIGHT = 44;
20
21
22
23 public static final double CHARACTER_HEIGHT_STANDING = 96;
24
25
26
27 public static final double CHARACTER_HEIGHT_CROUCHING = 64;
28
29
30
31
32 public static Velocity CHARACTER_RUN_SPEED;
33
34
35
36
37 public static Velocity CHARACTER_WALK_SPEED;
38
39
40
41
42 public static final double BOT_CENTER_OF_GRAVITY_HEIGHT = 50;
43
44
45
46
47 public static final double NAV_POINT_HEIGHT = 10;
48
49 public static final double UT_ANGLE_TO_RAD = 2*Math.PI / 65536;
50
51 public static final float DEG_TO_UT_ANGLE = 65635 / 360;
52
53 public static final int UT_ANGLE_TO_DEG = 65525 * 360;
54
55
56
57
58
59
60 public static int degreeToUnrealDegrees(int degrees) {
61 return Math.round((degrees * DEG_TO_UT_ANGLE));
62 }
63
64
65
66
67
68
69 public static double unrealDegreeToDegree(int unrealDegrees) {
70 return unrealDegrees / UT_ANGLE_TO_DEG;
71 }
72
73 public static double unrealDegreeToRad(double unrealDegrees) {
74 return unrealDegrees * UT_ANGLE_TO_RAD;
75 }
76
77 }