Hi!
I have used automatic camera collison to detect when the camera collides with the cube object. With the response flag set to sliding collision, I'm satisfied with the results when colliding with the cube from the sides.
Now to my problem:
As you can see in the code I have added the camera(player) the abilility to hover over the ground when pressing the space key. While the space key is pressed I still can control the camera with the arrowkeys and drop down on top of the cube. Here comes the problem,,, Since a collision is detected when I drop down onto the box the camera gets stuck. But I want the player to be able to walk ontop of the cube instead of getting stuck.
Do I have to write my own collision routine or is there some built in commands i can use?
make matrix 1,1000,1000,25,25
position matrix 1,0,0,0
update matrix 1
position camera 0,0,10,0
make object cube 1,50
position object 1,100,0,100
automatic camera collision 0,5,0,0
do
control camera using arrowkeys 0,0.5,0.5
position camera 0,camera position x(0),get ground height(1,camera position x(0),camera position z(0))+5,camera position z(0)
if spacekey() = 1 then position camera 0,camera position x(0),camera position y(0)+100,camera position z(0)
loop