Problems with a mesh

santy86

New member
Joined
Apr 22, 2008
Messages
114
Reaction score
0
Points
0
Location
Amsterdam
Hi guys i am developing my first Add-On and i found a quite interesting, yet annoying problem. Maybe is typical for beginners :) Anyway the problem is that whenever i am closing my scenario file using CTRL+Q i get a crash to desktop with related windows error. I can run the scenario but everytime quit it crashes.

Moreover, how can I define the orientation of the mesh inside the C++ code?
Everytime i run the scenario, my rocket is lying on the ground and not standing up towards the sky

Thanks for eventual help,

Santy:thankyou:
 

n0mad23

Addon Developer
Addon Developer
Joined
Feb 10, 2008
Messages
1,078
Reaction score
17
Points
0
Location
Montesano
Website
soundcloud.com
Sorry I don't know what the problem is for your CTD (crash to desktop), or how to define the orientation within C++.

However, when you're creating your mesh, if you orient your craft correctly, it will be exported with that same orientation. In other words, you won't have this problem if you address it at the beginning.

Most 3d modeling programs will allow you to re-orient your model at a later time. In Anim8or, for example, you'd have to select all your groups and then "join groups" the lot. Then you'd rotate the whole thing into it's correct orientation, then go back and "ungroup" everything again. This mesh exported will eliminate your problem.
 

tblaxland

O-F Administrator
Administrator
Addon Developer
Webmaster
Joined
Jan 1, 2008
Messages
7,320
Reaction score
25
Points
113
Location
Sydney, Australia
I agree with n0mad23, it is much better to get your mesh orientation correct when you are modelling it. To this end, the following is an extract from the SDK "3DModel.pdf":
Vessel meshes should be oriented such that the vessel’s nose (or more precisely, its main thrust direction) points in the positive z-direction, the positive x-axis points right, and the positive y-axis points up.

Is this how your mesh is configured? You can check this by in sim pressing F4|Visual Helpers button|Axes tab|tick Coordinate Axes|tick Vessels. In an external view you should be able to see the axes.

Also, make sure you have correct entries for TouchdownPoints in either the config file or dll. These points define the "up" direction of your vessel when it is landed.

Talking of vessel coordinates, remember that your vessel's centre of mass (centre of gravity) will be located at the origin of your mesh. So, in addition to getting the orientation correct, you will want to get your origin correct also.

Finally, you can manipulate the vessel's meshes with the MeshgroupTransform function but it is better to have the items above correct first.
 

santy86

New member
Joined
Apr 22, 2008
Messages
114
Reaction score
0
Points
0
Location
Amsterdam
Thanks a lot guys i solved the problem of CTD :speakcool: and i saw that actually i have a bad mesh (the rocket longitudinal plane lies along Z axis instead of Y axis). I hope to be able to spin the mesh in the correct way.

P.S.
Never try to save a string which is NULL in the scenario file :rofl:
 
Top