How to obtain the picked point's coordinates using PickCanvas?

My class is somewhat like


public class IntersectInfoBehavior extends Behavior {
PickCanvas pickCanvas;
....
}

I just want my main class to obtain the picked point’s coordinates by using this IntersectInfoBehavior

So, can anybody give me a hand on how to deal with it?

Best Regards
JIA Pei

Use a WakeupOnAWTEvent to get notified when user clicks. Use the click position to pick using pickCanvas. Read the intersections back. If you need the intersection in world space you have to transform the intersection with the intersected nodes localtoVWorld transform.

Thank you.

Problem solved !!!

Thanks.

An additional question…

I’m trying to obtain positions of multiple picked points. In fact, I am able to realize this already.

My question is how to display all of those picked points? Whenever I picked a second point (or the third, fourth…etc), the first point (first n-1 points) will be removed from the screen. I just want to realize something like : whenever I picked one additional point, the former picked points won’t be removed at all.

Best Regards
JIA Pei