Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: killface on August 12, 2008, 07:48:25 pm

Title: Very fast missiles and no clipping
Post by: killface on August 12, 2008, 07:48:25 pm

Kind of a random question...I set up what's supposed to be a missile that moves very fast, 3500 m/s.  It's a dumbfire, meant for planetary defense.  Anyway...it flies right through Leviathan cruisers without hitting them.  Is there some sort of upward limit to how fast a missile (or any object, I suppose) can move before its clipping gets all screwy?

Thanks,

Killface
Title: Re: Very fast missiles and no clipping
Post by: colecampbell666 on August 12, 2008, 08:01:15 pm
When it moves that fast, I assume that it's too fast for collision detection.
Title: Re: Very fast missiles and no clipping
Post by: Flaming_Sword on August 12, 2008, 08:14:40 pm
I generally don't set anything faster that 2000m/s. I've only tested primaries at 2000m/s, though.
Title: Re: Very fast missiles and no clipping
Post by: Solatar on August 12, 2008, 08:25:54 pm
What's your rationale for having a missile go that fast?
Title: Re: Very fast missiles and no clipping
Post by: Retsof on August 12, 2008, 09:14:28 pm
I'm gonna say superlong distance.
Title: Re: Very fast missiles and no clipping
Post by: killface on August 12, 2008, 09:19:12 pm

What's the rationale???  Um, an insanely deadly weapon that the player's confederates need to destroy, of course   :p
Title: Re: Very fast missiles and no clipping
Post by: killface on August 12, 2008, 10:14:37 pm

Um, alright...this is weird.  I cranked down the speed to 1500 m/s and still...not hitting those leviathans.  Is there something about the small and angly nature of the ship model itself that poses collision detection problems?  I can hit the ships with my own primaries just fine...what the hell?
Title: Re: Very fast missiles and no clipping
Post by: Wanderer on August 13, 2008, 01:37:47 am
You could probably try if it works at lower velocities.
Title: Re: Very fast missiles and no clipping
Post by: ShadowGorrath on August 13, 2008, 03:43:08 am
The missile, if it was retextured it wouldn't have collision detection. Or overall might not have collision detection. Could this be a problem/reason for going through? If so, then just open the missile model in PCS2 and purge the BSP cache.
Title: Re: Very fast missiles and no clipping
Post by: Vasudan Admiral on August 13, 2008, 04:19:27 am
AFAIK missiles don't have any POF based collision detection - they're considered to be just a point (with a radius?) by the game. Just keep lowering the velocities until either it collides or it's clearly around the speeds of the standard missiles and still not colliding.

That said, a missile moving that fast seems a little outside the established FS universe. For comparison the fastest missile in the game is the Tag A at 400m/s, and you barely see them moving when you're not firing.
Title: Re: Very fast missiles and no clipping
Post by: Alan Bolte on August 13, 2008, 01:44:38 pm
I can see why you'd want fast missiles if you're trying to use the engine for something outside the Freespace universe. A number of modern missiles can achieve thousands of meters per second.
Title: Re: Very fast missiles and no clipping
Post by: Topgun on August 13, 2008, 01:51:27 pm
yeah, everything in freespace is super slow.
Title: Re: Very fast missiles and no clipping
Post by: lostllama on August 13, 2008, 01:58:55 pm
It probably wouldn't fit in unless you increased the ship and weapon speed by a notch or two, for example something like in Joshua's RealFlight mod. IIRC he altered the tables so ship and weapon speeds were all increased somewhat. But not on the order of 3000+m/s.
Title: Re: Very fast missiles and no clipping
Post by: killface on August 13, 2008, 05:56:06 pm

The internal logic to it is that the missile is being launched via railgun techology - i.e. a magnetic mass driver - and once launched at this uber rapid speed it kicks in its targeting system.  Basically its moving too fast for any enemy ship to avoid or intercept...and also too fast to HIT the damn ships either, it seems.

HOWEVER, I noticed that when I switched the ships to Deimos or Aeolus class vessels, this problem ceased.  The missiles made contact at 3000+ m/s!  So I'm thinking this has to be an issue with the leviathan model in particular.  Even weirder, when I left the leviathans in and increased the game speed to 4x, the missiles made contact and destroyed the leviathans!  WTF, people!!
Title: Re: Very fast missiles and no clipping
Post by: Topgun on August 13, 2008, 06:13:38 pm
it's a bug then.
Title: Re: Very fast missiles and no clipping
Post by: Nuke on August 15, 2008, 09:43:40 am
ive never had a problem with weapons with velocitys in excess of 10000 m/s. if youre using models, check the radius data, using the laser codes there is never a problem. missiles on the other hand ive not tested at those speeds. but definately make sure both weapon model and target ship have working radius and/or collision data.
Title: Re: Very fast missiles and no clipping
Post by: Admiral_Stones on August 15, 2008, 11:05:14 am
ive never had a problem with weapons with velocitys in excess of 10000 m/s. if youre using models, check the radius data, using the laser codes there is never a problem. missiles on the other hand ive not tested at those speeds. but definately make sure both weapon model and target ship have working radius and/or collision data.

I'm by no means an expert, but why don't you try making it a normal weapon instead of a missile, should work fine as a turret. As a player weapon however you could make it a primary lazor with ammunition count.
Title: Re: Very fast missiles and no clipping
Post by: Titan on August 15, 2008, 01:55:30 pm
ya, and just use the maxim effect.
Title: Re: Very fast missiles and no clipping
Post by: esarai on August 15, 2008, 05:44:04 pm
About it the missiles not hitting the Leviathan...
It's not only the leviathan that won't get hit by some uber-fast projectile. I've noticed that sometimes when I cheat and load a Perseus full of Helios and launch them dumbfire, the cruisers shoot down the bombs. So I punch the burners to give the missile a little boost, but if the missile goes too fast without a lock, it passes right through the ship. It's happened on almost all cruisers for me, but doesn't happen with a missile lock. I would suggest giving the missile a heat  homing capability, but make its turn time REALLY REALLY long so that the missile will have a lock and will hit, but will not look like it had guidance, appearing more "projectile-ish". Heat-seekers will almost always have a lock when used on a cruiser, and will hit the thing, almost no exceptions.

I made several "Cruise Missiles" that are mounted on my destroyers, and they travel well above the ghosting limit (I noticed it to be a little past 110 m/s) for most missiles when dumbfired, but since they have heat seeking on, the always have a lock and always hit, even when boosted.

you could make it a primary lazor with ammunition count.

IMMA FIRIN' MAH LAZOR!!!!
Title: Re: Very fast missiles and no clipping
Post by: Nuke on August 16, 2008, 03:28:16 am
ive had problems like this while testing my guided missile script. i thought it would be cool to have an afterburner on the missile, but the missile refused to hit anything when its velocity was more than the max speed set in the table. my solution was to double the max speed and then set the velocity to only have that when the afterburner was off. if youre using the additive weapon velocity feature, there may be some sort of bug in it.