2025-07-18 02:36 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0005886Spring engineGeneralpublic2018-05-07 04:55
Reporterraaar 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
StatusnewResolutionopen 
Product Version104.0 +git 
Target VersionFixed in Version 
Summary0005886: option beamlasers to track emit piece rotation
DescriptionCurrently, when a mobile unit fires a beamlaser, if it moves while firing, the emit point and end point move along with it, but if it turns (for example, if the unit's body turns faster than the turret), it's shown shooting sideways.

There should be an option (new weapondef) to make the beam match not just the emit piece's movement translation but also its rotation.

There could be a weapondef to control how much angle tolerance it has compared to the desired orientation before "turning off" the beam.

This would also allow people to control beam orientation by turning the piece while firing, for custom sweep-fire behavior.
Tagsaiming, beamlaser, unit, weapon
Checked infolog.txt for Errors
Attached Files

-Relationships
has duplicate 0005987closed beamttl doesnt stick to weapon 
+Relationships

-Notes

~0018788

Kloot (developer)

beamlasers in Spring do not work how you think, and this is not solvable with just a "new weapondef".

~0018802

raaar (reporter)

Missiles have the fixedlauncher option at the moment, which "makes the projectile spawn with the orientation of the shooting piece instead of their normal orientation."

I'm asking for the same for beamlasers.

Instead of drawing them from source point in the direction of target point, draw them in the direction of the emit piece up to the point where it fades or collides with something.

The two directions should be close enough to hit targets if the weapon is aiming properly, if it isn't, that's either intended or the game dev has some options do deal with it by adjusting the frequency of aim calls, tolerances and beam times.

can you point to the code?

~0018965

Anarchid (reporter)

You can emulate this with emits or spawnprojectiles.

~0019079

raaar (reporter)

btw, on my game, as I couldn't make the beam follow the rotation, I made the rotation follow the beam

https://github.com/springraaar/metal_factions/blob/master/scripts/gear_luminator.bos#L278

when the unit turns, while it's firing (the beam duration is over 2s), there's a separate thread that checks every frame and rotates the turret to keep it locked to the correct orientation on xz plane.
+Notes

-Issue History
Date Modified Username Field Change
2018-02-08 05:56 raaar New Issue
2018-02-08 07:53 raaar Tag Attached: aiming
2018-02-08 07:53 raaar Tag Attached: beamlaser
2018-02-08 07:53 raaar Tag Attached: unit
2018-02-08 07:53 raaar Tag Attached: weapon
2018-02-08 10:29 Kloot Severity major => feature
2018-02-08 10:34 Kloot Note Added: 0018788
2018-02-11 17:55 raaar Note Added: 0018802
2018-04-03 12:37 Anarchid Note Added: 0018965
2018-05-07 04:55 raaar Note Added: 0019079
2018-05-19 12:31 Kloot Relationship added has duplicate 0005987
+Issue History