I cannot help with that code [As I do not yet own DDYN], but I can help introduce you to
code lang=dbp
sync on
sync rate 60
autocam off
position camera -49,8,-45
rem VARIABLE TO SCALE AIRPLANE PARTS
ridutt_scale# = 1.5 rem parametro di riduzione della scala degli oggetti
rem STARTING POSITION VARIABLES for AIRPLANE
add_height# = 32
add_x# = 0
add_z# = 0 rem >>>>>>>>> PUT FROM -10 TO HIGHER NEGATIVE VALUE AND THE FRONTAL WHEEL WILL WORK FINE!
rem ******************************** MAIN OBJECT 1 BODY (where all airplane parts will join in)
rem corpo aereo
MAKE OBJECT CYLINDER 8999, 28
scale object 8999, (80/ridutt_scale#)/3, (280/ridutt_scale#)/3, (80/ridutt_scale#)/3
color object 8999,rgb(200,200,200)
rem position object 8999, 8, 40, -28.99
position object 8999, 0+add_x#, 0+add_height#, 0+add_z#
rotate object 8999,90,0,0
set object cull 8999,0
rem ************************** LEFT WING.
rem ala sinistra
load object "ala_sin.x",9000
rem scale object 9000,33.3 , 33.3, 33.3
color object 9000,rgb(200,200,200)
rem position object 9000, -8.53+add_x#, 1.31+add_height#, -7.87+add_z#
position object 9000, -10.91+add_x#, 0.5+add_height#, -2.46+add_z#
rem ************************** RIGHT WING.
rem ala sinistra
load object "ala_des.x",9001
rem scale object 9001,33.3 , 33.3, 33.3
rem rotate object 9001,0,0,-180
color object 9001,rgb(200,200,200)
position object 9001, 11+add_x#, 0.5+add_height#, -2.47+add_z#
rem ************************** ATTACH FOR WINGS
rem ATTACH FOR WINGS
make object box 9002, 10,2.5,34
scale object 9002,33.3 , 33.3, 33.3
rotate object 9002,0,0,0
color object 9002,rgb(200,200,200)
position object 9002, 0+add_x#, 1.89+add_height#, 0+add_z#
rem ************************** TAIL CONE
rem tail cone
MAKE OBJECT CONE 9003, 28
scale object 9003,(80/ridutt_scale#)/3, (260/ridutt_scale#)/3 , (80/ridutt_scale#)/3
color object 9003,rgb(200,200,200)
position object 9003, 0+add_x# , 1.16+add_height#, -16.40+add_z#
rotate object 9003,-82,0,0
rem ************************** RUDDER TAIL
rem rudder tail
load object "ala_aereo_scaled2.x",9004
rem altezz lunghezz
scale object 9004, 17.0 , 13.3, 31.3
color object 9004,rgb(255,200,200)
position object 9004, -0.5+add_x#, 0.0+add_height#, -22.6+add_z#
rotate object 9004,0,0,-90
rem ************************** TAIL LEFT
rem piano coda SIN
load object "ala_sin.x",9005
scale object 9005,38 , 38, 58
color object 9005,rgb(200,200,200)
position object 9005, -4.40+add_x#,2.08+add_height#,-19.01+add_z#
rotate object 9005,5.28,-8.03,0
rem ************************** TAIL RIGHT
rem piano coda DES
load object "ala_aereo_scaled2.x",9006
scale object 9006,32.3/2 , 32.3/2, 32.3/1.5
color object 9006,rgb(200,200,200)
position object 9006, -2.20+add_x#,2.58+add_height#,-21.92+add_z#
rotate object 9006,-5.28,-8.29,-180
rem ************************** MUZZLE
rem MUSO
MAKE OBJECT CONE 9007, 28
scale object 9007,(80/ridutt_scale#)/3 , (260/ridutt_scale#)/3 , (80/ridutt_scale#)/3
color object 9007,rgb(200,200,200)
position object 9007, 0+add_x#, -0.63+add_height#, 16.62+add_z#
rotate object 9007,94,0,0
set object cull 9007,0
rem ************************** CAP
rem CALOTTA
load object "calotta3.x",9008
scale object 9008, (4/ridutt_scale#)/3 , (3/ridutt_scale#)/3, (4/ridutt_scale#)/3
color object 9008,rgb(153,217,234)
position object 9008, 0+add_x#, 3.95+add_height#, 12.53+add_z#
rotate object 9008,0,90,0
rem ************************** RIGHT ENGINE
rem lato sin
make object box 9009, 0.10, 1.8, 12
color object 9009,rgb(180,180,180)
position object 9009, 2.52+add_x#,0.45+add_height#,-0.58+add_z#
rem lato giu
make object box 9010, 0.10, 1.4, 12
color object 9010,rgb(180,180,180)
rotate object 9010,0,0,90
position object 9010, 3.27+add_x#,-0.39+add_height#,-0.58+add_z#
rem lato des
make object box 9011, 0.10,1.8,12
color object 9011,rgb(180,180,180)
position object 9011, 4.02+add_x#,0.45+add_height#,-0.58+add_z#
rem lato su
make object box 9012, 0.10,1.4,12
color object 9012,rgb(180,180,180)
position object 9012, 3.27+add_x#,1.3+add_height#,-0.58+add_z#
rotate object 9012,0,0,90
rem ************************** LEFT ENGINE
rem lato sin
make object box 9020, 0.10, 1.8, 12
color object 9020,rgb(180,180,180)
position object 9020, -2.52+add_x#,0.45+add_height#,-0.58+add_z#
rem lato giu
make object box 9021, 0.10, 1.4, 12
color object 9021,rgb(180,180,180)
rotate object 9021,0,0,90
position object 9021, -3.27+add_x#,-0.39+add_height#,-0.58+add_z#
rem lato des
make object box 9022, 0.10,1.8,12
color object 9022,rgb(180,180,180)
position object 9022, -4.02+add_x#,0.45+add_height#,-0.58+add_z#
rem lato su
make object box 9023, 0.10,1.4,12
color object 9023,rgb(180,180,180)
position object 9023, -3.27+add_x#,1.3+add_height#,-0.58+add_z#
rotate object 9023,0,0,90
rem ************************** LEFT WING. SINGOLA
rem ala sinistra
load object "ala_sin.x",9200
rem scale object 9200,33.3 , 33.3, 33.3
color object 9200,rgb(200,200,200)
position object 9200, -15.53+add_x#, 2.31+add_height#, -32.87+add_z#
rem linea portanza ala sin
make object box 9201,0.2,8,0.2
color object 9201, rgb(255,0,0)
position object 9201,40,8,40
rem linea portanza ala des
make object box 9202,0.2,8,0.2
color object 9202, rgb(55,255,0)
position object 9202,40,8,40
rem *****************************************************************************
rem *********************************** WHEELS ***********************************
make object cylinder 9100, 1.6 : set object cull 9100,0 rem frontale
make object cylinder 9101, 2.6 : set object cull 9101,0 rem sin
make object cylinder 9102, 2.6 : set object cull 9102,0 rem des
//--Rotate Cylinders
rotate object 9100, 0, 0, 90
rotate object 9101, 0, 0, 90
rotate object 9102, 0, 0, 90
//--Fix Pivot
fix object pivot 9100
fix object Pivot 9101
fix object pivot 9102
//--Rotate back
rotate object 9100, 0, 0, -90
rotate object 9101, 0, 0, -90
rotate object 9102, 0, 0, -90
//--Position Wheels
position object 9100, 0+add_x#, -5.2+add_height#, 9+add_z# rem sin
position object 9101, -5.63+add_x#, -4.2+add_height#, -4.75+add_z# rem sin
position object 9102, 5.63+add_x#, -4.2+add_height#, -4.75+add_z# rem des
rem ************************** LIGHT ****************************************
luce_pos_Y# = 150
set ambient light 10
set point light 0,0,luce_pos_Y#,0
rem SUN OBJECT
make object sphere 5000,5,5,5
position object 5000,0,luce_pos_Y#,5
color object 5000,rgb(255,255,255)
//---------------------------------------------------------------------------------
//----------------------------------------- Physics ON ----------------------------
//---------------------------------------------------------------------------------
DYN START
DYN SET PARAMETER 9, 1
DYN SET PARAMETER 39, 1
DYN SET PARAMETER 28, 1
DYN SET PARAMETER 29, 1
DYN SET GRAVITY 0.0, -9.8, 0.0
rem ************************** TERRAIN ****************************************
rem DYN MAKE GROUND PLANE
make object box 10000, 500,10,500
color object 10000,rgb(50,210,10)
position object 10000,0,0,0
DYN MAKE BOX 10000, 0.0 //Static terreno
rem ------------ PHYSICS AND JOINT FOR AIRPLANE PARTS --------------------
rem ----------------------------------------------------------------------
DYN MAKE BOX 8999, 1 rem main body
DYN COOK CONVEX MESH 9000, 2 rem left wing
DYN MAKE CONVEX MESH 9000, 2, 0.4
DYN COOK CONVEX MESH 9001, 3 rem right wing
DYN MAKE CONVEX MESH 9001, 3, 0.4
DYN COOK CONVEX MESH 9002, 4 rem attach wings
DYN MAKE CONVEX MESH 9002, 4, 0.3
DYN COOK CONVEX MESH 9003, 5 rem tail cone
DYN MAKE CONVEX MESH 9003, 5, 0.1
DYN COOK CONVEX MESH 9004, 6 rem rudder plane
DYN MAKE CONVEX MESH 9004, 6, 0.3
DYN COOK CONVEX MESH 9005, 7 rem tail left
DYN MAKE CONVEX MESH 9005, 7, 0.3
DYN COOK CONVEX MESH 9006, 8 rem tail right
DYN MAKE CONVEX MESH 9006, 8, 0.3
DYN COOK CONVEX MESH 9007, 9 rem muzzle
DYN MAKE CONVEX MESH 9007, 9, 0.5
DYN COOK CONVEX MESH 9008, 10 rem cap
DYN MAKE CONVEX MESH 9008, 10, 0.3
FOR a = 9009 to 9012 rem right engine
DYN MAKE BOX a,0.1
NEXT
FOR a = 9020 to 9023 rem left engine
DYN MAKE BOX a,0.1
NEXT
rem ----------- WHEELS ----------------
DYN MAKE WHEEL 9100,0.5 rem 10
DYN MAKE WHEEL 9101,0.4 rem 10
DYN MAKE WHEEL 9102,0.4 rem 10
DYN COOK CONVEX MESH 9200, 11 rem ala test
DYN MAKE CONVEX MESH 9200, 11, 0.4
rem LET'S JOIN THE AIRPLANE PARTS TO THE MAIN OBJECT BODY
num_joint = 1
FOR a = 9000 to 9008
makeJointFixed(num_joint, 8999, a) rem pezzi
num_joint = num_joint + 1
NEXT
num_joint = 10
FOR a = 9009 to 9012
makeJointFixed(num_joint,8999,a) rem motore des
num_joint = num_joint + 1
NEXT
num_joint = 14
FOR a = 9020 to 9023
makeJointFixed(num_joint,8999,a) rem motore des
num_joint = num_joint + 1
NEXT
rem wheels
makeJointFixed(18,8999,9100)
makeJointFixed(19,8999,9101)
makeJointFixed(20,8999,9102)
rem -------------------------- GRUPPI COLLISIONE -------------------------
rem ----------------------------------------------------------------------
rem GRUPPO COLLISIONE CORPO AEREO
rem main body group 1
DYN SET GROUP 8999,1
rem airplane parts group 2
FOR a = 9000 to 9008
DYN SET GROUP a,2
NEXT
rem engines group 2 too
FOR a = 9009 to 9012
DYN SET GROUP a,2
NEXT
FOR a = 9020 to 9023
DYN SET GROUP a,2
NEXT
DYN GROUP SET COLLISION 1,2,1 rem disabilito la collisione tra corpo aereo e supporti carrello
DYN SIMULATE rem GO SIMULATION!
rem ********************************************************************************
rem ********************************************************************************
rem ******************************** MAIN LOOP *************************************
rem ********************************************************************************
rem ********************************************************************************
DO
rem ///////////////////////////////////////////////////////
rem ////////////////////////////// UPDATE
rem ///////////////////////////////////////////////////////
//-- Apply forces
//-- Create/Delete actors
DYN FETCH RESULTS rem permette di aggiornare la scena e fare le modifiche fisiche
DYN UPDATE rem sincronizza gli oggetti agli attori DarkDynamix
//Manipulate physics here, eg add forces, make/delete actors etc
rem UPDATE WHEELS
DYN WHEEL UPDATE 9100, 0
DYN WHEEL UPDATE 9101, 0
DYN WHEEL UPDATE 9102, 0
DYN DEBUG RENDER rem mostra la grafica 3d del debug
DYN SIMULATE rem ---------- FROM HERE CAMERA COMMANDS ETC
fps_live = SCREEN FPS()
rem //////////////////////////////////////////////////////
rem /////////////////////////////////// CAMERA
rem //////////////////////////////////////////////////////
position camera object position x(8999)+40,object position y(8999)+10,object position z(8999)+40
point camera object position x(8999),object position y(8999),object position z(8999)
rem //////////////////////////////////////////////////////
rem /////////////////////////////////// PUSHING THE AIRPLANE
rem //////////////////////////////////////////////////////
IF lower$(inkey$()) = "f"
DYN ADD LOCAL FORCE AT LOCAL POS 8999,0,43000.0,0 , 0,0,0
TEXT 100,100,"--------- ADDING FORCE TO MAIN BODY -----------"
ENDIF
sync
loop
DYN FETCH RESULTS
DYN STOP
//-- Fixed jo fixes two actors together as though they are one actor, they will not move
//-- or rotate relative to each other.
function makeJointFixed(jointID, objectA, objectB)
//-- Create descriptor data structure.
DYN MAKE JOINT DESC 1
//-- Locked motion relative to joint position.
DYN JOINT DESC SET MOTION X 1, 0
DYN JOINT DESC SET MOTION Y 1, 0
DYN JOINT DESC SET MOTION Z 1, 0
//-- Locked rotation also.
DYN JOINT DESC SET SWING1 MOTION 1, 0
DYN JOINT DESC SET SWING2 MOTION 1, 0
DYN JOINT DESC SET TWIST MOTION 1, 0
//-- What actors are involved?
DYN JOINT DESC SET ACTOR A 1, objectA
DYN JOINT DESC SET ACTOR B 1, objectB
//-- Must set this after actors have been set.
//-- Location of anchor can be anything for a fixed joint.
DYN JOINT DESC SET GLOBAL ANCHOR 1, 0, 0, 0
DYN JOINT DESC SET GLOBAL AXIS 1, 0, 1, 0
//-- Create joint.
DYN MAKE JOINT jointID, 1
//-- No longer need descriptor.
DYN DELETE JOINT DESC 1
endfunction
I find myself mentioning this usage a lot lately lol I apologise for doing it but if nobody mentions it, >.<
I will have a quick scan of your code for now and edit my post or if someone posts soon post again, if I find anything...
EDIT
Woops fixed a typo in my code snippet opening said code lang-dbp instead of code lang=dbp, my bad
EDIT
I think the issue is within your main LOOP