enemyColl = sc_sphereCastGroup(1,evx#,evy#,evxz#,evx#,evy#-10,evz#,10,0)
if enemyColl <> 0
play object 500,1
text 500,50,str$(get terrain ground height(terrainObj,evx#,evz#))
position object 500,evx#,get terrain ground height(terrainObj,evx#,evz#),evz#
move object left 500,1
endif
if enemyColl = 0
move object down 500,1
endif
When I run the code the play object command is run when enemyColl = 0 thou it should'nt. I know this because the enemy is moving left until he falls over the edge of the world. At this moment enemyColl = 0 and he moves down. Should'nt enemyColl always be true as long as something crosses the ray casted by the sc_SphereCastGroup command?
The enemy moves over a heightmap terrain which is set up with sc_SetupComplexObject
BEST!
www.memblockgames.com