Joined: 17 Nov 2005, 02:43 Location: Raegquitting Spring on 04/24/12
If your ballistic shot is so fast that the trajectory is flat, you slow down the projectile and it will start being fired in an arc. OR You increase gravity on the projectile so that the unit must aim higher to get more distance. My fixes are very right.
a problem i encountered with this is that the procetile isn't fired at the maximum range and also has problems with targeting higher terrain.
What i want would be: behaviour similar to "hightrajectory" aka fire in the air with at least 45 degrees angular but without the shot going to the moon and back. Perhaps the missile weapontype is more usefull for that?
Joined: 17 Nov 2005, 02:43 Location: Raegquitting Spring on 04/24/12
Yeah knorke is right. Achieving that kind of angle and still getting maximum range on a cannon weapontype is very difficult if not outright impossible. In this way, missiles are a lot easier to get along with.
If your ballistic shot is so fast that the trajectory is flat, you slow down the projectile and it will start being fired in an arc. OR You increase gravity on the projectile so that the unit must aim higher to get more distance. My fixes are very right.
This appears to be a misunderstanding stemming from the colloquial phrase 'just a little'. I interpret it that he wants a reduction of value; 'just a little, not a lot'. Whereas you interpreted it as 'just a little more than the current nothing'.
Using a missile is not a good solution. A missile will not look like a ballistic projectile, the arc and velocity is not quite the same, it doesn't gain or lose ranged based on height in the same way (I know this one can be modified, but it wouldn't look balistic).
A 45 degree firing is easy but a bit tedious. Set myGravity on the weapon to something around 0.1-0.2 depending on weaponVelocity and range. Here is an example:
range = 820
weaponVelocity = 300
myGravity = 0.11
Those are some values to give you a sense of scale, if weaponVelocity is higher or range lower you can set myGravity higher.
Then execute this algorithm:
Code:
While (not fedUp)
if actualRange < range then decrease myGravity
if angle < 45 degrees then increase myGravity
restart Spring end while
actualRange can be measured by spawning a unit in the top left corner of the man and checking the position of the range ring. Check the tooltip for position numbers, they have the same units as range.
angle can be measured by 'eyeing-off' the projectile as your unit fires, scroll down to look at it side on.
Joined: 17 Nov 2005, 02:43 Location: Raegquitting Spring on 04/24/12
45 degrees isn't just a little. It's quite a bit. But as I originally stated. You would achieve it by increasing gravity or decreasing velocity.
Google, I dunno when the last time you messed with ballistic projectiles was, but the synopsis is this: Lower velocity = more arc (come on, this just makes sense... When you are throwing a baseball as far as you can you don't throw it flat, you arc it so you get more distance, it works the same way in spring).
Increasing gravity is similar to lowering velocity (in effect, you actually are lowering velocity... in a way). But that's all retarded theory of BS bla bla. If you want a faster projectile, then increase velocity and gravity and you will have your arc with a fast moving projectile. The inverse applies, etc etc.
If your ballistic shot is so fast that the trajectory is flat, you slow down the projectile and it will start being fired in an arc. OR You increase gravity on the projectile so that the unit must aim higher to get more distance. My fixes are very right.
This appears to be a misunderstanding stemming from the colloquial phrase 'just a little'. I interpret it that he wants a reduction of value; 'just a little, not a lot'. Whereas you interpreted it as 'just a little more than the current nothing'.
Getting ballistic weapons to fire exactly (well, so long as map gravity is ~120) at 45 degrees at their maximum range is easy btw.
Code:
local GRAVITY = 120
for weapName in pairs(WeaponDefs) do if WeaponDefs[weapName].customparams then if WeaponDefs[weapName].customparams.howitzer then WeaponDefs[weapName].weaponvelocity = math.sqrt(WeaponDefs[weapName].range * GRAVITY) end end end
Joined: 22 Feb 2006, 01:02 Location: cheap kitchen
FLOZi wrote:
GRAVITY = 120
Game.gravity? or does that not work in _post file?
missile/ballistic depends on what you need. if you just want a slight arc so that tanks can fire over each other when in close formation, I found missiles easier to use.
Just force it with myGravity, keeps maps from fucking with your balancing.
Anyway, cannons in Spring are simulated according to physics and since the bullets are fired at a fixed speed the angle varies according to the target distance. If you want a hightrajectory shot to stay low then slow the projectile down. If that decreases the range then you are asking the impossible from your gun, that it shoots a bullet further than physically possible given the velocity it's fired at. Many games cheat and vary gravity or something to make their shots arc at 45┬░ at any range but Spring isn't designed for that nonsense.
Just force it with myGravity, keeps maps from fucking with your balancing.
Anyway, cannons in Spring are simulated according to physics and since the bullets are fired at a fixed speed the angle varies according to the target distance. If you want a hightrajectory shot to stay low then slow the projectile down. If that decreases the range then you are asking the impossible from your gun, that it shoots a bullet further than physically possible given the velocity it's fired at. Many games cheat and vary gravity or something to make their shots arc at 45┬░ at any range but Spring isn't designed for that nonsense.
Nicely done. In second thought, if a high powered ballistic weapon fired at its maximum or limit distance that would probably do a curve trajectory on it bullet,right?
Vindicator wrote:
Field target cross bows are usually hand-made, often home-made by their users.
Last edited by SirDario on 21 Feb 2012, 08:53, edited 1 time in total.
Users browsing this forum: No registered users and 0 guests
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum