hi Latch tried the head moving code with a model but can't get it to work for some reason pity you can't have commands like pitch limb up, or pitch limb down then things would work easliy I think
sync on : sync rate 120
hide mouse
rem Make drone to mark a back position
make object sphere 3,10
hide object 3
player = 1
REM player object
LOAD OBJECT "H-Babe-move.x",player
SCALE OBJECT player,300,300,300
YROTATE OBJECT player,180
FIX OBJECT PIVOT player
LOOP OBJECT player,5,25
x# = 50.0
z# = 50.0
set object collision on player
make object collision box player,-2,-2,-2,2,2,2,1
x# = 50.0
z# = 50.0
sfov#=3.14/2.905
old#=mousemovez()
fov#=sfov#
do
rem whenever planning to set the camera to an objects orientation
rem you may need to change the rotation order of the object or camera
set object rotation zyx player
position camera objx,objy+(17height),objz
set camera to object orientation player
rem create code to rotate the head similar to the mouse look code
headx=wrapvalue(limb angle x(player,17)+mousemovey())
heady=wrapvalue(limb angle y(player,17)+mousemovex())
rotate camera wrapvalue(camera angle x()+17x),wrapvalue(camera angle y()+17y),0
mmy=mousemovey()
mmx=mousemovex()
` if mmy>0 then rotate limb player,17,90,0,0
` if mmy<0 then rotate limb player,17,-90,0,0
if mmx<0 then turn object left player,10
if mmx>0 then turn object right player,10
`controls
if upkey()=1
x#=newxvalue(x#,angy#,2.0)
z#=newzvalue(z#,angy#,2.0)
endif
if downkey()=1
x#=newxvalue(x#,wrapvalue(angy#-180),2.0)
z#=newzvalue(z#,wrapvalue(angy#-180),2.0)
endif
if rightkey()=1
x#=newxvalue(x#,wrapvalue(angy#+90),2.0)
z#=newzvalue(z#,wrapvalue(angy#+90),2.0)
endif
if leftkey()=1
x#=newxvalue(x#,wrapvalue(angy#-90),2.0)
z#=newzvalue(z#,wrapvalue(angy#+90),2.0)
endif
`mouse looking
angy#=wrapvalue(angy#+mousemovex()*2)
angx#=wrapvalue(angx#+mousemovey()*2)
angy#=curveangle(angy#,camera angle y(),10.0)
angx#=curveangle(angx#,camera angle x(),10.0)
`zoom/sniper
if mousemovez()<>old
mousemoved#=(mousemovez()-old#)/1200
old#=mousemovez()
else
mousemoved=0
endif
newfov#=fov#-mousemoved#
fov#=curvevalue(newfov#,fov#,5)
if fov#<0.1 then fov#=0.1
if fov#>sfov# then fov#=sfov#
set camera FOV fov#
If InKey$() = "1" Then cammode = 1 : ` third person
If InKey$() = "2" Then cammode = 0 : ` first person
`update camera
` rotate object angx#,angy#,0
` position object x#,y#,z#
If cammode = 0
rem Place camera and set orientation to object for FPS
position camera object position x(player),object position y(player),object position z(player)
set camera to object orientation player
rem Place as over head for 3rd person
move object player,-20
position object 3,object position x(player),object position y(player),object position z(player)
move object player,10
rem Place camera and set orientation to object
position camera object position x(3),object position y(3),object position z(3)
set camera to object orientation player
Endif
sync
loop