Ok,
I just thought i'd have a mess around with the vehicle part of dark physics, as i've never used it before, I have my car model
found the limb numbers of the wheels
and it rotates the wheels
YEY!, but in the wrong axis
see picture below for example.
Image Link
As you can see the whell spokes are rotated to above the car!
So any ideas?
ill even post my code for you all
Phy Start
Phy Set Gravity 0, -981, 0
Sync On
Sync Rate 30
Autocam Off
`Load Object "MediaCoursesTestCourse.dbo", 1
make object box 1, 1000, 10, 1000
scale object 1, 500, 500, 500
Phy Make Rigid Body Static Mesh 1
Load Object "MediaCarsSeatmodel.x", 100
Position Object 100, 0, 70, 0
rotate limb 100, 9, 0, 90, 0 `to check if rotating the limb helped!
phy create vehicle 100
phy add vehicle body 100,object size x(100),object size y(100)/3.5,object size z(100),0,0,0
phy add vehicle wheel 100,9,3,-3,5,12,10,1,0
phy add vehicle wheel 100,27,-3,-3,5,12,10,1,0
phy add vehicle wheel 100,15,3,-3,-5,12,10,0,0
phy add vehicle wheel 100,21,-3,-3,-5,12,10,0,0
`phy set vehicle static friction 100,0.0
`phy set vehicle dynamic friction 100,0.0
`phy set vehicle max motor 100,360
`phy set vehicle steering delta 100,0.25
`phy set vehicle max steering angle 100,45
`phy set vehicle suspension spring 100,0.0
phy build vehicle 100
Do
CarX = Object Position x(100)
CarY = Object Position y(100)
CarZ = Object Position z(100)
CarA = Object Angle y(100)
Text 0, 0, "Position : " + Str$(CarX) +", " + Str$(CarY) + ", " + Str$(CarZ)
if LeftKey() then dec CamRot
if RightKey() then inc CamRot
if UpKey() then dec CamDist, 10
if DownKey() then inc CamDist, 10
Set Camera To Follow CarX, CarY, CarZ, CarA + CamRot, 700 + CamDist, 160, 10, 0
DriveCar(CarA, CarX, CarY, CarZ)
Phy Update
Sync
Loop
Function DriveCar(a#,x#,y#,z#)
key = 0 : force#=0.0
if keystate ( 17 ) = 1
force#=100
key = 1
endif
if keystate ( 31 ) = 1
force#=-100
key = 1
endif
if key = 0 then force#=0.0
phy set vehicle motor force 100,force#
EndFunction
and my car is attached...
Yours
Tv.