You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The idea is that the slashing beam loosely tracks moving targets by having the end of the slash be where the target will be according to the target's motion at the time it starts firing. Allowing for example: Low damage anti-fighter beams that stay on moving targets but can still be avoided by turning or accelerating/decelerating after the beam starts firing - Beams that follow fast moving and/or small capital ships - Beams that directly fire on gliding ships and stay on as if said ship was not moving - more interesting anti-fighter beam possibilities overall - ect.
This would be done by adding each of the target ship's velocity vectors individually multiplied by the beam's lifetime to the +End Position coordinates.
Here is an example of the math using the fire-beam-at-coordinates SEXP:
"Attacking Ship"
"Beam Turret"
( get-object-x "Target Ship" )
( get-object-y "Target Ship" )
( get-object-z "Target Ship" )
( true )
( +
( get-object-x "Target Ship" )
( *
3 ;; In this example, the beam has a lifetime of 3 seconds
( get-object-speed-x
"Target Ship"
( false )
)
)
( *
-1 ;; this is to subtract the parent ship's speed this may not be needed
( get-object-speed-x
"Attacking Ship"
( false )
)
)
)
( +
( get-object-y "Target Ship" )
( *
3 ;; In this example, the beam has a lifetime of 3 seconds
( get-object-speed-y
"Target Ship"
( false )
)
)
( *
-1 ;; this is to subtract the parent ship's speed
( get-object-speed-y
"Attacking Ship"
( false )
)
)
)
( +
( get-object-z "Target Ship" )
( *
3 ;; In this example, the beam has a lifetime of 3 seconds
( get-object-speed-z
"Target Ship"
( false )
)
)
( *
-1 ;; this is to subtract the parent ship's speed
( get-object-speed-z
"Attacking Ship"
( false )
)
)
)
)
)
As a feature, the table entry would look something like this:
+Move End Position by target velocity: LIFETIME with an option for a float for tracing ahead or behind targets, this would be ideally be determined before any offsets. Note that it's perfectly fine if Lifetime is the only option.
A +Move End Position by target velocity x lifetime: YES would be just as good.
It could also have a better name, such as "Slash End Position Leads Target"
Another nice option would be to allow for whether the parent ship's velocity is added, subtracted, or ignored.
I would greatly appreciate anyone looking into this. Please and Thank You.
The text was updated successfully, but these errors were encountered:
The idea is that the slashing beam loosely tracks moving targets by having the end of the slash be where the target will be according to the target's motion at the time it starts firing. Allowing for example: Low damage anti-fighter beams that stay on moving targets but can still be avoided by turning or accelerating/decelerating after the beam starts firing - Beams that follow fast moving and/or small capital ships - Beams that directly fire on gliding ships and stay on as if said ship was not moving - more interesting anti-fighter beam possibilities overall - ect.
This would be done by adding each of the target ship's velocity vectors individually multiplied by the beam's lifetime to the +End Position coordinates.
Here is an example of the math using the
fire-beam-at-coordinates
SEXP:As a feature, the table entry would look something like this:
+Move End Position by target velocity: LIFETIME
with an option for a float for tracing ahead or behind targets, this would be ideally be determined before any offsets. Note that it's perfectly fine if Lifetime is the only option.A
+Move End Position by target velocity x lifetime: YES
would be just as good.It could also have a better name, such as "Slash End Position Leads Target"
Another nice option would be to allow for whether the parent ship's velocity is added, subtracted, or ignored.
I would greatly appreciate anyone looking into this. Please and Thank You.
The text was updated successfully, but these errors were encountered: