Added terrain collision checks