Collision is a tricky part in game developement.
We will have to know more details about your project to give you a helpful answer.
Please read the Topics about the "collision-engine" in the handbook (F1 in SED) then give it a try and ask again.
Your primary keywords may be: collision hull, c_updatehull(), narrow, fat, POLYGON, GLIDE