The only way i've found to get it to work is to make the object you wish to tilt correctly the limb of another object. I can't remember if i've posted this before but here it is in a handy function with a commented demo to show you how to use it
It was basically lifted from from the tank demo in dbc, but works in Pro.
Sync On
Sync Rate 50
`Each Tilting model needs 2 objects, 1 is hidden the other is glued to it
`hidden object
Make Object Cone 1,1
Hide Object 1
`visible object(eg.tank model)
Make Object Cube 2,50
Scale Object 2,100,50,200
`glue the visible object to the hidden one
Glue Object To Limb 2,1,0
`make a matrix randomize and update
Make Matrix 1,5000,5000,10,10
Randomize Matrix 1,250
Update Matrix 1
Do
`some basic controls
`notice we move the hidden object not the visible one
If Upkey()=1 then Move Object 1,5
If Downkey()=1 then Move Object 1,-5
If Rightkey()=1 then YAng#=WrapValue(YAng#+5)
If Leftkey()=1 then YAng#=WrapValue(YAng#-5)
`get he xpos and zpos of the hidden object for the tilt function
Xpos#=Object Position X(1)
Zpos#=Object Position Z(1)
`Tilt(Matrix Number,YAngle of Hidden Object,Xpos,zpos,base(width of object))
Tilt(1,2,1,YAng#,Xpos#,Zpos#,100)
`position object above the ground so it doesn't sink
Position Object 1,Xpos#,Object Position Y(1)+12.5,Zpos#
`follow_object(object,behind,above,angle)
Follow_Object(1,250,Object Position Y(1)+100,Object Angle Y(1)-180)
Sync
Loop
Function Tilt(MatNum,Obj,LimbObj,a#,x#,z#,foot#)
ta#=wrapvalue(a#-45)
frontleftx#=newxvalue(x#,ta#,foot#)
frontleftz#=newzvalue(z#,ta#,foot#)
ta#=wrapvalue(a#+45)
frontrightx#=newxvalue(x#,ta#,foot#)
frontrightz#=newzvalue(z#,ta#,foot#)
ta#=wrapvalue(a#+225)
backleftx#=newxvalue(x#,ta#,foot#)
backleftz#=newzvalue(z#,ta#,foot#)
ta#=wrapvalue(a#+135)
backrightx#=newxvalue(x#,ta#,foot#)
backrightz#=newzvalue(z#,ta#,foot#)
rem Calculate degree of tilting from corner heights
frontlefth#=get ground height(MatNum,frontleftx#-mx#,frontleftz#-mz#)
frontrighth#=get ground height(MatNum,frontrightx#-mx#,frontrightz#-mz#)
backlefth#=get ground height(MatNum,backleftx#-mx#,backleftz#-mz#)
backrighth#=get ground height(MatNum,backrightx#-mx#,backrightz#-mz#)
across#=((frontrighth#-frontlefth#)+(backrighth#-backlefth#))/2.0
length#=((backlefth#-frontlefth#)+(backrighth#-frontrighth#))/2.0
rem Update tank model
h#=get ground height(MatNum,x#-mx#,z#-mz#)
trackh#=(frontlefth#+frontrighth#+backlefth#+backrighth#)/4.0
if trackh#>h# then h#=trackh#
position object LimbObj,x#,h#,z#
yrotate object LimbObj,a#
rotate object Obj,wrapvalue(length#/4.0),0,wrapvalue(across#/4.0)
EndFunction
Function Follow_Object(Obj,Behind,Above,Angle#)
CamX=Newxvalue(object position x(Obj),Angle#,Behind)
CamZ=Newzvalue(object position z(Obj),Angle#,Behind)
Position Camera CamX,Above,CamZ
Point Camera Object position x(Obj),object position y(Obj),object position z(Obj)
EndFunction
have fun
In the beginning, the universe was created...
This made alot of people very angry and it has been widely regarded as a bad idea...
Visit
http://redeye.dbspot.com