All pastes #552393 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-06-09 08:26 UTC
rendered paste body
'''Note that X and Y are valid- the crash doesn't occur until an RSQ is successful. *Nothing* is done with the result except return it from the function.

cameraray:tray=TRay.CreateEmpty()
Camera.getCameraToViewportRay( x,y , cameraRay )
Local cameraquery:TRaySceneQuery= MainSceneManager.createRayQuery( cameraRay,EntityType)
cameraQuery.setRay( cameraRay )
cameraQuery.setSortByDistance(True,0)
pickedMO = cameraquery.execute()