Gameplay::findSpawnPointInDirection: Difference between revisions
(yay) |
(yay) |
||
| Line 1: | Line 1: | ||
Finds a position ahead of the player by predicting the players next actions.<br>The positions match path finding node positions.<br>When roads diverge, the position may rapidly change between two or more positions. This is due to the engine not being certain of which path the player will take.<br><br>=======================================================<br>I may sort this with alter research, but if someone<br>already knows please tell what the difference in <br>X2, Y2, Z2 is. I doubt it's rotation. Is it like <br>checkpoints where X1, Y1, Z1 is your/a position and<br>X2, Y2, Z2 is a given position ahead of that position?<br>======================================================= | Finds a position ahead of the player by predicting the players next actions.<br>The positions match path finding node positions.<br>When roads diverge, the position may rapidly change between two or more positions. This is due to the engine not being certain of which path the player will take.<br><br>=======================================================<br>I may sort this with alter research, but if someone<br>already knows please tell what the difference in <br>X2, Y2, Z2 is. I doubt it's rotation. Is it like <br>checkpoints where X1, Y1, Z1 is your/a position and<br>X2, Y2, Z2 is a given position ahead of that position?<br>======================================================= | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="javascript">gameplay.findSpawnPointInDirection(x1, y1, z1, x2, y2, z2, distance, spawnPoint);</syntaxhighlight> | <syntaxhighlight lang="javascript">mp.game.gameplay.findSpawnPointInDirection(x1, y1, z1, x2, y2, z2, distance, spawnPoint);</syntaxhighlight> | ||
=== Required Arguments === | === Required Arguments === | ||
*'''x1:''' float | *'''x1:''' float | ||
| Line 15: | Line 15: | ||
==Example== | ==Example== | ||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
todo | // todo | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==See also== | ==See also== | ||
{{ | {{Gameplay_s_function_c}} | ||
[[Category:Clientside API]] | [[Category:Clientside API]] | ||
[[Category:TODO: Example]] | [[Category:TODO: Example]] | ||
Revision as of 21:06, 6 May 2017
Finds a position ahead of the player by predicting the players next actions.
The positions match path finding node positions.
When roads diverge, the position may rapidly change between two or more positions. This is due to the engine not being certain of which path the player will take.
=======================================================
I may sort this with alter research, but if someone
already knows please tell what the difference in
X2, Y2, Z2 is. I doubt it's rotation. Is it like
checkpoints where X1, Y1, Z1 is your/a position and
X2, Y2, Z2 is a given position ahead of that position?
=======================================================
Syntax
mp.game.gameplay.findSpawnPointInDirection(x1, y1, z1, x2, y2, z2, distance, spawnPoint);
Required Arguments
- x1: float
- y1: float
- z1: float
- x2: float
- y2: float
- z2: float
- distance: float
- spawnPoint: Vector3
Return value
- Vector3
Example
// todo