• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Get the x,y position of hitTestObject()?

Participant ,
Nov 30, 2011 Nov 30, 2011

Copy link to clipboard

Copied

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....

TOPICS
ActionScript

Views

742

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Nov 30, 2011 Nov 30, 2011

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 30, 2011 Nov 30, 2011

Copy link to clipboard

Copied

LATEST

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/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines