Page 1 of 1

Coordinate Information for a rigidBody

Posted: Tue Apr 28, 2015 8:10 am
by shashwatsher
Hi Guys

given x,y coordinates of my mouse pointer, i am trying to find out if there is a Rigidbody present at that point. Can anyone guide me towards a relevant function call that does it?

thx

Re: Coordinate Information for a rigidBody

Posted: Wed Apr 29, 2015 6:58 am
by Basroil
You'll need the camera information as well, and then a simple ray test should let you pinpoint objects under your pointer. There's a few examples in the demos, and the shootBox code is half the solution right there as well.