-
Notifications
You must be signed in to change notification settings - Fork 2
.solveStatic() Playcanvas
Alex edited this page Nov 14, 2021
·
3 revisions
- from (pc.Vec3) position from which the projectile is fired
- target (pc.Vec3) position of the target that projectile is trying to hit
- speed (number) projectile speed
- gravity (number, optional) the current world gravity, defaults to project global settings
- Returns 1 or 2 firing solutions, if found, otherwise
null
{
lowAngle: pc.Vec3(),
highAngle: pc.Vec3()
}
Solve firing angles for a ballistic projectile with speed and gravity to hit a fixed position.
Ballistics (c) 2020