you basically have to trace a line between the start point (your gun) to the end point. the end point can be tricky to find, depending on the type of game you are making (3rd person, 1rst person, 2D scroller, etc).
a very easy way to get around that is to create a mesh projectile, place it where your gun is, set the same rotation values of your gun and then use meshProjectile.MoveRelative(maxDistanceYourProjectileCanGo, 0, 0) and use thie new position as your end point
when you have your 2 points (called vectors), you use collision = tvscene.advancedcollision to see what intersects in between (if collision.isimpact). from there, you can get the mesh or actor or landscape ID and start having fun
