Skip to content

Commit 66f2a8b

Browse files
authoredMay 5, 2022
Document camera spline node smoothing (citizenfx#676)
* Document camera spline node smoothing * clarify parameter * Document 27 spline camera smoothing styles
1 parent e1d4597 commit 66f2a8b

3 files changed

+56
-7
lines changed
 

‎CAM/AddCamSplineNodeUsingCamera.md

+10-4
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,19 @@ aliases: ["0x0FB82563989CF4FB"]
66

77
```c
88
// 0x0FB82563989CF4FB 0xBA6C085B
9-
void ADD_CAM_SPLINE_NODE_USING_CAMERA(Cam cam, Cam cam2, int p2, int p3);
9+
void ADD_CAM_SPLINE_NODE_USING_CAMERA(Cam cam, Cam cam2, int length, int p3);
1010
```
1111
12+
Takes a camera and uses the information from it as a camera spline node.
13+
1214
1315
## Parameters
14-
* **cam**:
15-
* **cam2**:
16-
* **p2**:
16+
* **cam**: Camera to add cam2 as a node to
17+
* **cam2**: Camera used for reference
18+
* **length**: Duration used for transition, has no effect for the first node.
1719
* **p3**:
1820
21+
## Examples
22+
```cs
23+
AddCamSplineNodeUsingCamera(cam, CreateCamWithParams("DEFAULT_SCRIPTED_CAMERA", 975.9832f, 191.3923f, 86.82342f, -2.795285f, -0f, 154.0656f, 45f, true, 2), 5000, 3);
24+
```

‎CAM/SetCamSplineSmoothingStyle.md

+43-3
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,48 @@ aliases: ["0xD1B0F412F109EA5D"]
99
void SET_CAM_SPLINE_SMOOTHING_STYLE(Cam cam, int smoothingStyle);
1010
```
1111
12+
Sets the smoothing style for a DEFAULT_SPLINE_CAMERA
13+
Ranges from 0 to 3 in rockstar scripts although there are actually 26
14+
```
15+
0: No lead-in or lead-out smoothing
16+
1: Smooth lead-in
17+
2: Smooth lead-out
18+
3: Both lead-in and lead-out are smoothed
19+
4-6: Longer speed up, lead-in, lead-out, and both in order as above.
20+
6: see above, but missed a node in testing(?)
21+
7: Smoothed lead-in, longer smoothed lead-out
22+
8: Longer lead-in and lead-out than 6, didn't drop node
23+
9: Constant acceleration
24+
10: Constant deceleration. Dropped 2 nodes in testing.
25+
11: Same as 0
26+
12: 10 but slower lead-in, reaches end node less early
27+
13: Extremely close to 3, slightly longer lead-in/lead-out
28+
14: Constant acceleration, dropped last 2 nodes in testing and halted (?)
29+
15: Very similar to 10, did not drop any nodes.
30+
16: Long lead-in, dropped 2 nodes in testing, very long leadout.
31+
17: Constant acceleration, slower speed-up than 9
32+
18: Same as 17 is to 9, slightly longer lead-out, lingers at end node
33+
19: Very long lead in and out
34+
20: Very long, gradual lead-in acceleration at start, gets extremely fast
35+
21: Same as 20 but for constant deceleration
36+
22: 20 and 21 combined, long linger at end node. Dropped 2 nodes in testing
37+
23: Constant acceleration, doesn't complete path before it stops
38+
24: Same as 23 but with constant deceleration, but completes path
39+
25: 23 and 24 combined, insanely fast at middle.
40+
26: No noticable lead-in, misses last 2 nodes in testing
41+
27+: Alternates between 0 and 26
42+
```
1243
13-
## Parameters
14-
* **cam**:
15-
* **smoothingStyle**:
44+
The above is documented and graphed at [Spline Cam Interp Graphs](https://docs.google.com/spreadsheets/d/1ejyiMcEYrhhQOL0mLe8664UN-vU4Oh-SBqQnVcKlFIk/edit?usp=sharing)
45+
46+
```
1647

48+
Using 1-3 will result in misalignment from the passed durations for the spline nodes, the overall duration will remain but other nodes will be shortened if smoothing anything.
49+
50+
Graph below demonstrates interpolation between 0-1000 and back 10 times.
51+
52+
![](https://i.imgur.com/cixWh7m.png)
53+
54+
## Parameters
55+
* **cam**: The DEFAULT_SPLINE_CAMERA to apply the smoothing to
56+
* **smoothingStyle**: 0 to 3, 0 no additional smoothing, 1 smooth lead-in, 2 smooth lead-out, 3 smooth lead-in & lead-out

‎CUTSCENE/CanSetExitStateForRegisteredEntity.md

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ ns: CUTSCENE
77
// 0x4C6A6451C79E4662 0x8FF5D3C4
88
BOOL CAN_SET_EXIT_STATE_FOR_REGISTERED_ENTITY(char* cutsceneEntName, Hash modelHash);
99
```
10+
Returns if the script can begin interacting with the registered entity. Primarly used for lead-outs of cutscenes.
11+
Returns on frame after cutscene ends, so you cannot get is while using IsCutsceneActive()
1012
1113
Whether it is safe to start doing scripted actions on the entity, like simulating walking out of a cutscene.
1214
@@ -15,3 +17,4 @@ Whether it is safe to start doing scripted actions on the entity, like simulatin
1517
* **modelHash**: Can be 0
1618
1719
## Return value
20+
Whether or not it is safe to begin interacting with the entity

0 commit comments

Comments
 (0)
Please sign in to comment.