I just found out that the real physics system doesn't move with the AI
Since I create a manual character and walk around it.
sync on
sync rate 60
autocam off
position camera 0,30,-50
point camera 0,0,0
AI start
Phy start
makelevel()
addentity()
addai()
obj()
obs()
manualchar()
do
if leftkey ( )
turn object left 5, 1.0
endif
if rightkey ( )
turn object right 5, 1.0
endif
if upkey ( )
phy move character controller 5, 10.0
endif
rem **************************************************************************************************
rem **************************************************************************************************
AI update
Phy update
sync
loop
function makelevel()
make object box 1,50,2,50
color object 1,rgb(rnd(255),rnd(255),rnd(255))
position object 1,0,-1,0
phy make rigid body static box 1
endfunction
function addentity()
make object cube 2,5
color object 2,rgb(rnd(255),rnd(255),rnd(255))
position object 2,25,2.5,0
phy make capsule character controller 2,25,2.5,0,5,10,1,5,45
endfunction
function addai()
ai add enemy 2
endfunction
function obj()
ai entity go to position 2,-22.5,0
endfunction
function obs()
make object box 3,5,10,20
rotate object 3,rnd(180),rnd(180),rnd(180)
color object 3,rgb(rnd(255),rnd(255),rnd(255))
position object 3,5,30,0
phy make rigid body dynamic box 3
make object box 4,5,10,20
color object 4,rgb(rnd(255),rnd(255),rnd(255))
position object 4,-5,5,0
phy make rigid body static box 4
endfunction
function manualchar()
make object cube 5,5
position object 5,-10,2.5,-10
phy make box character controller 5, -10, 2.5, -10, 2.5, 2.5, 2.5, 1, 1.5, 45.0
endfunction