This is basically a rolling problem.
Look at this
Sync On
Sync Rate 30
Autocam Off
Hide Mouse
`/\/\/\/\/Objects\/\/\/\/\
`Sphere
Make Object Sphere 1,5 : Position Object 1,10,0,10
`Katamari
Load Object "katamari_boo.x",2 : Position Object 2,10,0,10
`Matrix
Make matrix 1,1000,1000,50,50
Load image "grass.bmp",1
Prepare matrix texture 1,1,1,1
Fill matrix 1,0,1
Randomize Matrix 1,20
`***************************** Main Loop ********************************
Do
`/\/\/\/\/Katamari Codes\/\/\/\/\
`Stats
kangX# = Object Angle X(2)
kangY# = Object Angle Y(2)
kangZ# = Object Angle Z(2)
`Restrictions
If posX#<5.0 then posX#=5.0
If posZ#<5.0 then posZ#=5.0
If posX#>995.0 then posX#=995.0
If posZ#>995.0 then posZ#=995.0
`Connecting Objects
`Set Object to Object Orientation 1,2
`Set Object to Camera Orientation 1
`/\/\/\/\/Movement With Keys\/\/\/\/\
`Forward with the W key
If Keystate(17)=1
Xrotate Object 2,Wrapvalue(kangX#+15)
Move Object 1,2
Endif
If Keystate(31)=1
Xrotate Object 2,Wrapvalue(kangX#-15)
Move Object 1,-2
Endif
`/\/\/\/\/Mouse Stuff\/\/\/\/\
`Left Rotate
If MousemoveX() < -10
Yrotate Object 2,Wrapvalue(kangY#-4)
Yrotate Object 1,Wrapvalue(angY#-4)
Endif
`Right Rotate
If MousemoveX() > 10
Yrotate Object 2,Wrapvalue(kangY#+4)
Yrotate Object 1,Wrapvalue(angY#+4)
Endif
`/\/\/\/\/Camera Stuff\/\/\/\/\
`Objects Variables
posX# = Object Position X(1)
posZ# = Object Position Z(1)
posY# = Get Ground Height(1,posX#,posZ#)
angX# = Object Angle X(1)
angY# = Object Angle Y(1)
angZ# = Object Angle Z(1)
Position Object 1,posX#,posY#+5,posZ#
Position Object 2,posX#,posY#+5,posZ#
`Camera Variables
CamposZ# = Newzvalue(posZ#,Wrapvalue(angY#-180),35)
CamposX# = Newxvalue(posX#,Wrapvalue(angY#-180),35)
CamposY# = Get Ground Height(1,posX#,posZ#)
`Positioning
Position camera CamposX#,CamposY#+35,CamposZ#
`Camera Attention
Point camera posX#,posY#,posZ#
`Refresher
Sync
Loop
`***************************** End of Loop *********************************
with all that it still wont roll correctly. I tell ti to Yrotate with the mouse, and I assumed that when you rotate about on pivot the other pivots change, so why wont it roll forward? It just stays rolling in one direction.
Help?
Enemy Lasagna