Hello all. I am a bit confused on gravity and some basics of object collision. I have been going through the tutorials and I am a bit confused. Every example that has the player colliding with the ground is using some sort of matrix. On the other hand, I am using CShop 4.0 and export my levels as a model (.X Direct X). Do I also need to generate a matrix to path across where the model will 'walk' or is there a way to get the top model height directly underneath another model? Here is one of the example scripts I am looking at as an example.
if yPos#<get ground height(1,xPos#,zPos#)
ySpeed#(id)=ySpeed#(id)+(yPos#-get ground height(1,xPos#,zPos#))
yPos#=get ground height(1,xPos#,zPos#)
endif
I need a replacement for ground height. I suppose I could layer a matrix on every part of the model I would like the player to walk but that could become rather tedious.
3DS Max 9
CShop 4.0
DB Pro (Latest as of Oct 2011)