General Question Vessels Ground Impact

Oznerol

Just landed on the Moon
Tutorial Publisher
Joined
Sep 22, 2010
Messages
24
Reaction score
0
Points
0
Location
Germany
Hello!
I am creating my own .dll since a week. Now i have a problem:
If the Vessels Mesh impacts the ground orbiter ignores this and the vessel goes on falling. Orbiter notices the impact only, if the vessel's center impacts the ground. After that impact, and after all engines shutdown, orbiter sets the vessel to it's defined touchdown points. I have noticed ships like XR-Vessels, DGIV and even the stock DG don't have a behaviour like that.
I don't want such a weak touchdown like described before. I want my Vessel to act like DGIV, XR-Vessels and so on. How do the ships create the realistic behaviour? Does anyone know an answer?

PS.: Maybe im am stupid, but i haven't found even a clue in all documentations and the sourcecode of ShuttlePB and the stock DG.
 
If the Vessels Mesh impacts the ground orbiter ignores this and the vessel goes on falling. Orbiter notices the impact only, if the vessel's center impacts the ground. After that impact, and after all engines shutdown, orbiter sets the vessel to it's defined touchdown points.

No, the touchdownpoints are defined at vessel creation. Be sure they are correctly defined, geometry counts and that can be tricky...
 
i have actually defined the touchdown points. If the vessel sits on them it looks perfectly. That's not the problem: Try to crash the stock dg into ground: It will bounce almost like it would do in real. (exept the fact that it would be destroyed) I want to do that in my vessel too. I don't know how.

---------- Post added at 03:19 PM ---------- Previous post was at 12:52 PM ----------

Just to make sure everybody understands my problem i made a short (and very bad) video about what i mean. I am flying an stock DG into the ground to demostrate orbiters bulid-in collision control with the ground. After that i demonstrate my own ship. It's a Luna3 Probe based on C3POs Mesh but with by own custom .dll The .dll isn't ready to release. One th the reasons why is the collision with the ground, which i am demonstrating in the video:
Does anyone know how to fix that problem?
 
what do you mean?
I use only one call of "SetTouchdownPoints" in the clbkSetClassCaps void.
This Method becomes three Vectors as arguments.
actually this stands in my code:
Code:
SetTouchdownPoints(_V(0,0.33,1),_V(-1,0.73,-1),_V(1,1.23,-1));
 
There's your problem. SetTouchdownPoints only takes three vectors, you have four. So delete one coordinate from each vector and you should be set.
 
There's your problem. SetTouchdownPoints only takes three vectors, you have four. So delete one coordinate from each vector and you should be set.
I can't see 4 vectors. I see 3 Vectors. And every Vector takes three numbers.
I looked up the SetTouchdownPoints of the stock DG and it is the same exept for the numbers.
Here the original code from stock DG
Code:
SetTouchdownPoints (_V(0,-2.57,10), _V(-3.5,-2.57,-3), _V(3.5,-2.57,-3));
 
there are only 3 in each, not 4, those are decimals, not seperators
 
where does anything take 4 ? I see 3 vectors, separated with commas and every vector takes 3 numbers wich dots as decimals and commas to semarate the numbers. Where is my fault? I and my VC++ 2010 Express don't see any fault.
Please show me the mistake.
 
Last edited:
Your vectors are correct.

- Try different sets of touchdownpoints. Try those of the DG, Atlantis or the ShuttlePB... There is definitively something with the proportions of the triangle created by the points.
- Make sure they are well oriented, use "Visual Helpers - Axes" to make sure of where are the x, y & z coordinates of your ship.
- Good luck, from my experience this is one of the rare things that have a doubtful behavior in the Orbiter API. :cheers:
 
i always thought the API was very stable, does it often make little niggles like this?
 
This occurs with Moach's G42-200. stat 'er up, hit the engines and pitch up as soon as you start to roll, switch to external and watch the rear!
 
Have you ever tried to land the DG and deploy the landing gear a few seconds too late ? ;)

---------- Post added at 07:21 PM ---------- Previous post was at 07:01 PM ----------

Also note that Martins warns us in the API reference. COG could be related to it, too.

Code:
void VESSEL::SetTouchdownPoints  ( const VECTOR3 &  pt1,  
  const VECTOR3 &  pt2,  
  const VECTOR3 &  pt3   
 )   const 

Defines the three points defining the vessel's ground contact plane. 


Parameters:
 pt1  touchdown point of nose wheel (or equivalent)  
 pt2  touchdown point of left main wheel (or equivalent)  
 pt3  touchdown point of right main wheel (or equivalent)  

Note:
The points are the positions at which the vessel's undercarriage (or equivalent) touches the surface, specified in local vessel coordinates. 
The order of points is significant since it defines the direction of the normal. The points should be specified such that the cross product pt3-pt1 x pt2-pt1 defines the horizon "up" direction for the landed vessel (given a left-handed coordinate system). 

Modifying the touchdown points during the simulation while the vessel is on the ground can result in jumps due to instantaneous position changes (infinite acceleration). To avoid this, the touchdown points should be modified gradually by small amounts over time (proportional to simulation time steps). 

See also:

[I]GetTouchdownPoints, GetCOG_elev [/I]
 
What happens if you switch the second and third vectors in your SetTouchdownPoints call? The order matters.
 
SetTouchdownPoints(_V(0,0.33,1),_V(-1,0.73,-1),_V(1,1.23,-1));

Surely the 2nd and 3rd co-ordinates should have the same "y" values.
ie:
Code:
SetTouchdownPoints(_V(0,0.33,1),_V(-1,[B]0.73[/B],-1),_V(1,[B]0.73[/B],-1));
for example.

JMW
 
Thanks for your answers!
- Try different sets of touchdownpoints. Try those of the DG, Atlantis or the ShuttlePB... There is definitively something with the proportions of the triangle created by the points.
- Make sure they are well oriented, use "Visual Helpers - Axes" to make sure of where are the x, y & z coordinates of your ship.
- Good luck, from my experience this is one of the rare things that have a doubtful behavior in the Orbiter API.
That was the tip of the day! I tried and found now a set wich works perfectly!
What happens if you switch the second and third vectors in your SetTouchdownPoints call? The order matters.
I found out that in my tries. The order is very important. If your order is wrong the strangest things can happen. I even had a set wich makes the vessel jump 10 meters high if i burn any rcs thruster! :lol:
Surely the 2nd and 3rd co-ordinates should have the same "y" values.
In most cases this is right. If the y-coordinates aren't the same you can get this strange effects very fast.

To all the ones who want to have the new probe as addon: I asked C3PO about the Mesh and he said he is very lucky to have "found" a person who makes a .dll wich works in Orbiter 2010. I am going to release the vessel if it is ready.
 
Back
Top