Skip to main content
Inspiring
November 30, 2011
Question

Get the x,y position of hitTestObject()?

  • November 30, 2011
  • 2 replies
  • 791 views

How do I get the x,y position of  hitTestObject? Since I want to obtain the x,y position where the hit test occurs and add a movieclip on that specific point....

This topic has been closed for replies.

2 replies

Kenneth Kawamoto
Community Expert
Community Expert
November 30, 2011

hitTestObject() determiners if two objects intersect, therefore it's not a Point you can get from it - you can get the intersecting Rectangle.

--

Kenneth Kawamoto

http://www.materiaprima.co.uk/

_spoboyle
Inspiring
November 30, 2011

You can't hitTestObject only returns a boolean. The hitTest also might be a region and so you wouldn't know which x,y ofthis region to use.

You are probably going to have to detect if a hit has occured then interpolate between the 2 objects. without code its hard to help