Page 1 of 1

Weird docking process

Posted: Thu Nov 02, 2023 11:22 am
by phkb
I've been updating the Taranis OXP, giving the textures a bit of spit 'n' polish, and I've getting something weird when I dock with the station.

I'll state this from the start - the docking process works. You *can* dock with the station successfully, and I haven't had any issues with doing so.

However, just before the docking animation kicks in, the view from your cockpit appear to go through the back of the dock, your get a view of the big blue ball in the middle, and then the animation plays.

I've been looking through the shipdata, and I can't see anything wrong with the subentity declaration. It's valid, and, as mentioned, it allows you to dock with the station. I thought the positioning might be off, but that seems fine too. I pushed the Z value further out, but all that did was move the position of the dock model, not change the point at which the docking function begins.

For those who know about these things, is there something I should be looking for, or a setting I should check? I'm a bit lost on this one!

Re: Weird docking process

Posted: Thu Nov 02, 2023 3:07 pm
by Killer Wolf
as you say, a quick look seems to show the models are ok. could it be the camera view of the ship you're flying is a bit ahead of the ship itself, therefore seeing thorugh the model before the ship model triggers the dock?

Re: Weird docking process

Posted: Thu Nov 02, 2023 8:17 pm
by Stormrider
I experienced something similar with the distillery stations, once your point of view passed the outside edge of the station the model would disappear and you would see open space behind the station. I can't remember if the sub-entities beyond the station were visible or not.

The original model was made in wings 3d and I think the way I made the opening in the model caused the problem because I fixed it by creating a dock sub-entity that was extruded out from the side rather than putting a hole in the model. It took me a while to figure it out and it seems like I had pretty much recreated the whole model by the time I got it fixed.

Re: Weird docking process

Posted: Thu Nov 02, 2023 10:20 pm
by phkb
Ah ha! Thanks Stormrider! That’s given me an idea!

Re: Weird docking process

Posted: Fri Nov 03, 2023 12:33 am
by Cholmondely
phkb wrote: Thu Nov 02, 2023 10:20 pm
Ah ha! Thanks Stormrider! That’s given me an idea!
Have another idea - have you tried docking at KW's Hathor yet?

Re: Weird docking process

Posted: Fri Nov 03, 2023 1:04 pm
by phkb
I just did. Yes, same sort of thing, going through the back panel of the docking port. I don't know if that was a deliberate choice on KW's part, or something similar to the Taranis station. He might want to chime in.

Anyway, here's how I fixed it:
1. I turned the dock subentity into a plain subentity (ie not a dock). I removed the "is_dock" setting AND renamed the subentity key to not include the word "dock" in it. So it's still visible with all the flashers and lights and everything, but it doesn't have the docking protocol attached to it.
2. I used the "port_dimensions" and "port_radius" properties in the shipdata for the station to define the dock. That way I could invisibly move the position of the dock further out and away from the back of the subentity, so you enter the docking sequence before you pass through. The port dimensions I got by getting the boundingBox property of the dock subentity in game. The port radius was the Z coordinate of the subentity position, but pushed a little further out.

This method works only because the X and Y coordinates positioning the docking port are zero, and the only value to change is the Z coordinate. If X and Y were something other than zero, I don't think this method would work.

Re: Weird docking process

Posted: Fri Nov 03, 2023 5:18 pm
by cbr
phkb wrote: Fri Nov 03, 2023 1:04 pm

Anyway, here's how I fixed it:
Can we still bump the walls?

Re: Weird docking process

Posted: Fri Nov 03, 2023 7:59 pm
by Switeck
...and not instantly die?

Re: Weird docking process

Posted: Fri Nov 03, 2023 8:53 pm
by phkb
I haven’t changed the model at all, so, if you get close to a dock wall you’ll still bump it.

Re: Weird docking process

Posted: Sat Nov 04, 2023 2:51 am
by Switeck
Bump into the random "outside" parts of a major station and it's usually instant death...but docking tunnels seem a little more forgiving.