Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: KeldorKatarn on July 06, 2009, 02:20:55 pm
-
Is there any way to calculate the jump-in and jump-out distances of ships? How does the engine calculate those?
Would be really nice if there was an easy way to do this instead of trial and error.
-
Well... you can always use scripting to determine the jump in and jump out distances
-
Looking at the code at least for HUGE ships it seems easy to calculate...
Warpout distance = length * 0.5 - bbminz
length = length of the bounding box z dimension
bbminz = min z value of bounding box (negative, so it actually adds to the distance)
-
Does the engine actually check for a collision based on that data or does it check on a static short distance? I worry because the current FotG warpout code actually warps the ship halfway across the playing field. If it doesn't check through the necessary field of play we could try to warp through a Star Destroyer.
-
I haven't checked for that. It checks for something special when a ship is docked.. but I don't know if it does colission detection.
The warp code is quite messy and hard to understand at all.
-
how hard would it be to add a little indicator in fred which, if activated, would show where the jump hole would be when the ship warps out. this could save fredders alot of trial and error work.
-
Amen to that. I've had the same idea but have just reverted to trial-and-error while Fredding.
-
well as I wrote, with large capships you can calculate it with abolve formula.
-
I don't think there's a lot of collision detection going on when a ship warps in. I remember trying to fire bombs at a Deimos or Orion that was still in the process of jumping in and the bombs simply went through it.
-
Affirmative. Shots don't damage them until they're nearly through.
-
How does the collision warning - unable to jump thing work?
That is, when you're in a fighter, and you press alt+j, and it says "screw you" because there's a ship or asteroid in your way -- how does it determine that?
-
Affirmative. Shots don't damage them until they're nearly through.
Back during "Playing Judas" in FS1, I've had the Eva run me over as it warped in, and it never even touched me. It made lining up for scanning it quite easy.