Can someone please explain why when I use the "phy load rigid body dynamic mesh" command it makes my model completely vanish. But when I use "phy load rigid body static mesh" the model is displayed, and objects will bounce off it with no problems.
When I made the physics model I used the "phy make rigid body dynamic mesh" not that "phy make rigid body static mesh".
Any help would be appreshiated. I can't see a logical reason for this not working.
I've added the code I'm using here, and the model files I'm using as a download.
phy start
sync on
sync rate 60
set camera range 1, 30000
hide mouse
load object "nova.x", 1
phy load rigid body dynamic mesh 1, "nova.phy"
`phy make rigid body dynamic mesh 1,"nova.phy"
phy set rigid body mass 1, 127000
autocam off
Global OldCamAngleY# as Float
Global OldCamAngleX# as Float
Global CameraAngleY# as Float
Global CameraAngleX# as Float
global g_fSpeed# as Float
global ammoID as Integer
ammoID = 3
phy set gravity 0, 0, 0
do
userInput()
controlShooting()
circle screen width()/2,Screen height()/2,10
dot screen width()/2,Screen height()/2
phy update
sync
loop
function controlShooting()
if mouseclick()=1 `and mtimer<timer()
`mtimer = timer()+300
angy# = camera angle y()
angx# = -camera angle X()
make object sphere ammoID,3
position object ammoID,camera position x(),camera position y(),camera position z()
phy make rigid body dynamic sphere ammoID
phy set rigid body linear velocity ammoID, 150*sin(angy#)*cos(angx#),150*sin(angx#),150*cos(angy#)*cos(angx#)
phy set rigid body mass ammoID, 50
color object ammoID, rgb ( rnd ( 255 ), rnd ( 255 ), rnd ( 255 ) )
set object specular ammoID, rgb ( rnd ( 255 ), rnd ( 255 ), rnd ( 255 ) )
set object specular power ammoID, 255
set object ambient ammoID,0
inc ammoID
endif
endfunction
Function userInput()
` simple mouse and keyboard movement
` store old camera angle
OldCamAngleY# = CameraAngleY#
OldCamAngleX# = CameraAngleX#
` store new camera angle
CameraAngleY# = wrapvalue ( CameraAngleY# + mousemovex ( ) * 0.4 )
CameraAngleX# = wrapvalue ( CameraAngleX# + mousemovey ( ) * 0.4 )
` rotate camera
yrotate camera curveangle ( CameraAngleY#, OldCamAngleY#, 24 )
xrotate camera curveangle ( CameraAngleX#, OldCamAngleX#, 24 )
if upkey() = 1
move camera 5
endif
if downkey() = 1
move camera -5
endif
position mouse 400, 300
endfunction `OldCamAngleY#, OldCamAngleX#, CameraAngleY#, CameraAngleX#