-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathCameraDataModel.cs
More file actions
174 lines (156 loc) · 3.46 KB
/
Copy pathCameraDataModel.cs
File metadata and controls
174 lines (156 loc) · 3.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
using Game.Citizens;
using Unity.Entities;
using Unity.Mathematics;
namespace FirstPersonCamera
{
/// <summary>
/// The core data model for the camera
/// </summary>
internal class CameraDataModel
{
/// <summary>
/// The camera mode (e.g. Manual or Follow)
/// </summary>
public CameraMode Mode
{
get;
set;
} = CameraMode.Disabled;
/// <summary>
/// The last entity we were following
/// </summary>
public Entity LastFollowEntity
{
get;
set;
}
/// <summary>
/// The entity we may be following
/// </summary>
public Entity FollowEntity
{
get;
set;
} = Entity.Null;
/// <summary>
/// Is the player sprinting?
/// </summary>
public bool IsSprinting
{
get;
set;
}
/// <summary>
/// Represents mouse position input delta
/// </summary>
public float2 Look
{
get;
set;
}
/// <summary>
/// Represents movement input delta
/// </summary>
public float2 Movement
{
get;
set;
}
/// <summary>
/// The camera target position
/// </summary>
public float3 Position
{
get;
set;
}
/// <summary>
/// The camera target rotation
/// </summary>
public quaternion Rotation
{
get;
set;
}
/// <summary>
/// The camera's child rotation (Pitch pivot)
/// </summary>
public quaternion ChildRotation
{
get;
set;
}
/// <summary>
/// The camera yaw, used internally
/// </summary>
public float Yaw
{
get;
set;
}
/// <summary>
/// The camera pitch, used internally
/// </summary>
public float Pitch
{
get;
set;
}
/// <summary>
/// The camera entity scope
/// </summary>
public CameraScope Scope
{
get;
set;
} = CameraScope.Default;
/// <summary>
/// The vehicle scope type
/// </summary>
public VehicleType ScopeVehicle
{
get;
set;
} = VehicleType.Unknown;
/// <summary>
/// The citizen scope age
/// </summary>
public CitizenAge ScopeCitizen
{
get;
set;
}
/// <summary>
/// Disable camera effects (E.g. head bobbing)
/// </summary>
public bool DisableEffects
{
get;
set;
}
/// <summary>
/// Is transitioning into the first person camera
/// </summary>
public bool IsTransitioningIn
{
get;
set;
}
/// <summary>
/// Is transitioning out of the first person camera
/// </summary>
public bool IsTransitioningOut
{
get;
set;
}
/// <summary>
/// The start time of the transition
/// </summary>
public float TransitionStart
{
get;
set;
}
}
}