I didn’t know there was a rayCastTo() function.
rayCastTo() was added recently. Matter a fact, the first official release to have it, was 2.47.
did you read that objects with the “ghost” property are ignored?
Yea, but I don’t understand why you would need to detect ghost objects? If it’s a ghost object, you usually don’t want your object to be stopped in the first place… or maybe it’s must me. I guess it depends (once again) on your game.
ghost objects are detected for ray sensors anyways so you have to put that property to make the code ignore it ie: if there is a ghost object, do nothing (reading the script would help xD)
btw. rayCastTo() is there since 2.46 the one added in 2.47 was rayCast() (that have more functions)