Programming Question Dock to rotating pad

Kendo

New member
Joined
Oct 16, 2007
Messages
589
Reaction score
1
Points
0
Can I dock to a pad, and when I rotate the pad will the docked craft follow it round.? Again Spacecraft3. Thanks.
 

jedidia

shoemaker without legs
Addon Developer
Joined
Mar 19, 2008
Messages
10,842
Reaction score
2,105
Points
203
Location
between the planets
Can I dock to a pad, and when I rotate the pad will the docked craft follow it round.? Again Spacecraft3. Thanks.

If the pad moving around is a vessel, then that's no problem at all.

If the pad is an animated part of a vessel, and you have to make realtime updates to the docking port, the docked vessel should still follow the position... however, vessels docked or attached to the docked vessel will not do so and stay in their original place.
 

Kendo

New member
Joined
Oct 16, 2007
Messages
589
Reaction score
1
Points
0
At the moment its an animated part of the main craft.
I wasn,t sure if it would "stick" to the rotating pad.
Please bear in mind that the main craft will move.
You mentioned a vessel,( presumably for use in a scenario) I didn,t think of that, how do you position and animate that.?
Which is easier?.

Another thought is, can I add the rotating pad as a payload, with its own config, and animate it that way.
 
Last edited:

jedidia

shoemaker without legs
Addon Developer
Joined
Mar 19, 2008
Messages
10,842
Reaction score
2,105
Points
203
Location
between the planets
Please bear in mind that the main craft will move.

That isn't a problem at all.

Which is easier?.

That's the wrong question. The right question is "What is best for what you need to do". If you want to dock a vessel to a pad and then let the user fly the pad around, then of course doing it as a vessel is easier.
If the pad is part of a larger superstructure, which seems to be the case, then animating it and updating the docking port in real-time is the way to go. Docking port were not quite made with this in mind, but as far as I know, it works (with the limitation of "second generation" vessels. That is, as said, anything docked or attached to the docked vessel will NOT move with it).

Also note that docking ports don't work in landed state. If your pad is on the ground, you have to go with attachments instead.
 

Kendo

New member
Joined
Oct 16, 2007
Messages
589
Reaction score
1
Points
0
Thank you. Yes it is part of a superstructure. The idea is, you dock on the pad, then rotate it 180%, (with the docked craft rotating with it) then take off again.
You mentioned updating the docking port in realtime, I,m not sure what you mean and how do i do that?
Also, does the docking port have to be "on" the actual pad or can it be a few feet off the pad.
 

SolarLiner

It's necessary, TARS.
Addon Developer
Joined
Jun 14, 2010
Messages
1,847
Reaction score
2
Points
0
Location
404 ROAD NOT FOUND
I think you hit one SC3 limitation: Docks can't be "parented" to a group to follow its animation.
You'll have to go DLL in order to have that flexibility. Than you can write a piece of code that animates the docking port.
 

jedidia

shoemaker without legs
Addon Developer
Joined
Mar 19, 2008
Messages
10,842
Reaction score
2,105
Points
203
Location
between the planets
Sorry, didn't see you're using Spacecraft 3. I'm afraid you're out of luck there, SC3 only supports static docking ports as far as I know.

You mentioned updating the docking port in realtime, I,m not sure what you mean and how do i do that?

A docking port is just a point on your vessel with three properties: position, rotation and direction. It can be anywhere, Orbiter doesn't care. It defines a docking port where you tell it to define one, whether or not it makes sense is left to the one defining it.

Docking Ports are, therefore, not linked to the mesh. You can have a vessel without mesh that has docking ports, no problem. However, this also means that they are not included into an animation. If you want to move a docking port with an animated part, you'll have to recalculate and reset its properties for every frame during the animation yourself. This can only be done in a dll, not in spacecraft3.
 

Kendo

New member
Joined
Oct 16, 2007
Messages
589
Reaction score
1
Points
0
Thanks guys, I,ll forget the idea.

One of the generous members here is going to do a dll. for me.
 
Last edited:

Donamy

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Oct 16, 2007
Messages
6,904
Reaction score
196
Points
138
Location
Cape
You may be able to do it with the robotics animation in SC3.
 
Top