User Tools

Site Tools


4rpl:commands:ballisticarclateral

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Last revisionBoth sides next revision
4rpl:commands:ballisticarclateral [2021/01/08 11:01] – external edit 127.0.0.14rpl:commands:ballisticarclateral [2022/09/04 09:25] Karsten75
Line 1: Line 1:
 ~~NOTOC~~ ~~NOTOC~~
-<=[[4rpl:start| Index]]+<=[[4rpl:start| Index]] \\ 
 +<=[[4rpl:start#math_utility| Math Utility]] 
 + 
  
 ====== BallisticArcLateral ====== ====== BallisticArcLateral ======
Line 10: Line 13:
  Not every combination of inputs has a computable output. In the case the ballistic arc does not have a solution, zeros are returned for all values.  Not every combination of inputs has a computable output. In the case the ballistic arc does not have a solution, zeros are returned for all values.
  
- - from: Vector point projectile will fire from + - from: Vector point projectile will fire from\\ 
- - lateralSpeed: scalar speed of projectile along XZ plane + - lateralSpeed: scalar speed of projectile along XZ plane\\ 
- - target: Vector point projectile is trying to hit+ - target: Vector point projectile is trying to hit\\
  - maxHeight: height above Max(from, target) for projectile to peak at  - maxHeight: height above Max(from, target) for projectile to peak at
  
- Returns: + Returns:\\ 
- - fireVelocity: Vector firing velocity + - fireVelocity: Vector firing velocity\\ 
- - gravity: gravity necessary to projectile to hit precisely max_height+ - gravity: gravity necessary to projectile to hit precisely max_height\\
  - travelTime: The time it takes the projective to reach to target.  - travelTime: The time it takes the projective to reach to target.
  
 +This API synergizes with the [[4rpl:commands:ballisticarcpos|BallisticArcPos]] API which is a [[4rpl:commands:movetowards|MoveTowards]] type of API but for arcs rather than a straight line which can use the returned variables to enact a smooth and visually appealing parabolic motion for a custom unit.
  
 ===== Examples ===== ===== Examples =====
4rpl/commands/ballisticarclateral.txt · Last modified: 2024/01/04 14:03 by Kalli