- Joined
- Jul 7, 2012
- Messages
- 1,519
- Reaction score
- 1,542
- Points
- 128
- Location
- Monte Hermoso - Argentina
- Website
- github.com
- Preferred Pronouns
- he/him
As you may know, we're working on converting the Lua Sikorsky R-4 helicopter to C++ to add UACS support.
The first step was converting every line of Lua programming to C++.
And now we're running into the problem: the mesh won't load.
I've tested it on my Windows 11 + OpenOrbiter2024 installation, and it fails to load the mesh. I also get this error in the Orbiter.log:
This is the relevant code:
https://github.com/MatiasSaibene/Sikorsky_R-4_Helicopter_for_Orbiter/blob/master/Src_Windows/R4.cpp
The first step was converting every line of Lua programming to C++.
And now we're running into the problem: the mesh won't load.
I've tested it on my Windows 11 + OpenOrbiter2024 installation, and it fails to load the mesh. I also get this error in the Orbiter.log:
Code:
000054.798: ============================ ERROR: ===========================
000054.811: Could not load vessel module: R4 (code 126)
000054.823: [Vessel::LoadModule | D:\a\orbiter\orbiter\Src\Orbiter\Vessel.cpp | 5969]
000054.839: ===============================================================
This is the relevant code:
C++:
void R4::clbkPostCreation(){
hfuselage = oapiLoadMeshGlobal(FUS_MESH_NAME);
AddMesh(hfuselage);
ShiftMesh(0, operator*(cg, -1));
SetMeshVisibilityMode(0, MESHVIS_ALWAYS);
if(floats == false){
hgear = oapiLoadMeshGlobal(GEAR_MESH_NAME);
AddMesh(hgear);
ShiftMesh(1, operator*(cg, -1));
SetMeshVisibilityMode(1, MESHVIS_ALWAYS);
SetFeature_SetContactPointsWheels();
MakeAnim_MainWheels();
MakeAnim_TailWheel();
} else if(floats == true){
hfloats = oapiLoadMeshGlobal(FLOAT_MESH_NAME);
AddMesh(hfloats);
ShiftMesh(1, operator*(cg, -1));
SetMeshVisibilityMode(1, MESHVIS_ALWAYS);
SetFeature_MakeContactPointsFloats();
SetTouchdownPoints(td_points_pontoon_land, ntdvtx_td_points_pontoon_land);
}
}
https://github.com/MatiasSaibene/Sikorsky_R-4_Helicopter_for_Orbiter/blob/master/Src_Windows/R4.cpp

