I’ve made a bit of a hill but i can walk through it. The area around d hill is flat and i was able to avoid going through the ground by just keeping an eye on the height i was at:
if (height < 3)
height = 3;
But now i have a hill which complicates tings. I was lookin at a heap of collision detection tutorials on a bunch of sites but i find myself losing my sanity looking at them. The tutorials tell me to divide up the “world” into sections and test for collisions with these sections. So my question to you people is how do i divide up my world? the world is flat as a pancake besides this hill. the hill is the only ting i need to check for collisions. so i presume there’s no point dividing the whole world up??? I also don’t need to no much about the collision except that it has happened cos i want to just crash.
One reply i got was about a bounding box which includes the whole mountain. It doesn’t seem like a great idea to me cos if i go within 100 feet of the hill, i’ll crash in mid air! I want to avoid this method (unless i’m wrong about mid-air collisions??) so i need to find out how to split up the area around my hill and then check it for collisions.
Some code would be great if it’s not too much to ask