Difference between revisions of "bezierInterpolation"
Jump to navigation
Jump to search
(Fix and example) |
|||
Line 16: | Line 16: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
− | | progress [[bezierInterpolation]] <nowiki>[[x1, y1], ... [xn, yn]]</nowiki> |Syntax= | + | | progress [[bezierInterpolation]] <nowiki>[[x1, y1, z1], ... [xn, yn, zn]]</nowiki> |Syntax= |
|p1=progress: [[Number]] | |p1=progress: [[Number]] | ||
− | |p2=<nowiki>[[x1, y1], ... [xn, yn]]</nowiki>: [[Array]] | + | |p2=<nowiki>[[x1, y1, z1], ... [xn, yn, zn]]</nowiki>: [[Array]] |
| [[Array]] |Return Value= | | [[Array]] |Return Value= | ||
+ | ___________________________________________________________________________________________ | ||
− | | | + | |x1= Quick demonstration that spawns some spheres around player object:<code>[[for]] "_i" from 0 to 1 step 0.05 do { |
− | + | [[createVehicle]] ["Sign_Sphere10cm_F",(_i [[bezierInterpolation]] [ | |
− | + | [[player]] [[modelToWorld]] [0,0,0], | |
− | + | [[player]] [[modelToWorld]] [0,2,2], | |
− | + | [[player]] [[modelToWorld]] [2,0,2], | |
− | + | [[player]] [[modelToWorld]] [0,0,4] | |
− | + | ]),[],0,"CAN_COLLIDE"]; | |
− | + | };</code> |Example 1= | |
− | |||
− | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Revision as of 16:01, 24 November 2019
Description
- Description:
- Gets interpolated value based on bezier curve with given control points (progress is 0-1)wip
- Multiplayer:
- -
- Groups:
- Uncategorised
Syntax
- Syntax:
- progress bezierInterpolation [[x1, y1, z1], ... [xn, yn, zn]]
- Parameters:
- progress: Number
- [[x1, y1, z1], ... [xn, yn, zn]]: Array
- Return Value:
- Array
Examples
- Example 1:
- Quick demonstration that spawns some spheres around player object:
for "_i" from 0 to 1 step 0.05 do { createVehicle ["Sign_Sphere10cm_F",(_i bezierInterpolation [ player modelToWorld [0,0,0], player modelToWorld [0,2,2], player modelToWorld [2,0,2], player modelToWorld [0,0,4] ]),[],0,"CAN_COLLIDE"]; };
Additional Information
- See also:
- See also needed
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note