Here you go.... the gears now rotate.
1/. The gears were too far apart
2/. One of the gears you make static
They are a little wobbly as I would expect from two gears that have no axial support try adding a static spindle or two
Rem Project: gears
Rem Created: 25/08/2006 02:41:51
Rem ***** Main Source File *****
phy start
sync on
sync rate 0
color backdrop 0
load image "metal1.tga",1
make object box 1,100,1,100
position object 1,0,-0.5,0
texture object 1,1
phy make rigid body static box 1
makeCog(2,3,1,0,1,0,1)
makeCog(4,5,2,0,1,3,2)
do
phy set rigid body angular velocity 2,0,0.1,0
mousemove(0.1)
phy update
sync
loop
function mousemove(speed#)
if mouseclick()=1 then move camera speed#
if mouseclick()=2 then move camera 0-speed#
yrotate camera camera angle y()+mousemovex()
xrotate camera camera angle x()+mousemovey()
position mouse screen width()/2,screen height()/2
endfunction
function makeCog(cog,column,joint,x,y,z,cType)
if cType=1 then load object "gear.x",cog
if cType=2 then load object "gear2.x",cog
texture object cog,1
position object cog,x,y,z
phy make rigid body dynamic convex cog
if cType=1 then load object "column.x",column
if cType=2 then load object "column2.x",column
texture object column,1
position object column,x,y,z
phy make rigid body dynamic mesh column
phy make revolute joint joint,cog,column,0,1,0,x,y,z
endfunction
System
PIV 2.8 MZ 512 Mem
FX 5600 256 mem