Skip navigation
Currently Being Moderated

Scene Object Mouse Click Cooordinates (xyz)

Oct 28, 2011 6:47 AM

Anyone run into and figured out a method for detecting the scene coordinates (xyz) of a mouse click on an object? Very simply I have a two-dimentional plane (ground) and a box (character) that begins at x0,z0 (directly "on" the plane). I'd like to mouse-click on the plane and move the box to that spot based on the scene x,z. After a few days of trying I'm no closer to solving this seemingly straightforward issue. Anyone wanting to do "click to move" for 3D assets rather than keyboard or mouse drag will need this. Having no real documentation or code-view into the API isn't helping. Am I missing something that should be obvious?

 

I have to say that I'm a little surprised that there hasn't been any "official' responses to any of our questions. I think the Proscenium team has done a fantastic job so far with this framework. It's simple to setup and get going yet powerful by giving you great depth into the heart of Stage3D without stepping on the framework itself. But, it's not that hard to imagine that there are a lot of us wanting to move into this "new" medium but feel teased by what we've been shown ('code'us-interruptus?). At the moment you either have to know/learn what you need to create your own framework (a big task if you'v enever done it) or use someone elses. In my opinion the existing third-party options are bloated and unwieldy for my purposes. At a time where "everyone" is trying to quickly get their ideas to market with this new tech it's unfortunate we can't get a few simple questions answered. Seriously, if you have a "discussion" and see that any given post has 100 or more views but zero replys, that's not a discussion. You're just talking to yourself.

 

My appoligies for turning this into a rant.

 
Replies
  • Currently Being Moderated
    Nov 18, 2011 12:45 PM   in reply to march2342

    Hi,

    I think there is ansfer for your question in example file "TestPicking.as".

     

    there is:

    var node:SceneNode = scene.pick( x, y );

     

    where x and y are 2D screen coordinates

    and you get scene object with "position" vector3D - thats all you need to complete your task.

     

    regards, tra

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 19, 2011 12:17 PM   in reply to march2342

    Yes, you are right. Only tesselation of ground object into small pieces could help a bit with this workaround method but you still cant get exact position of click in 3d.

    Good luck with your framework and AGAL discoveries.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points