Hi, I’m picking nodes in my scene using PickCanvas. With the code I have written it will pick pretty much anything I can see, how do I shorten the distance at which I can pick?
Thanks 8)
Hi, I’m picking nodes in my scene using PickCanvas. With the code I have written it will pick pretty much anything I can see, how do I shorten the distance at which I can pick?
Thanks 8)
if you just need to pick the object in front of you, the pickClosest() will fit perfectly.
Else, you’ll need to use a PickSegment with setShapeSegment(Point3d start, Point3d end)
Hi
Thanks for your reply. I am using pickClosest() which is perfect for what I want. The problem is I can be a huge distance away and still pick it. I am using this picking to allow the player to interact with NPCs; so if there is a great distance between them I don’t want them to be able to interact.
Is there a way of setting this or do I have to work out the distance between the player and the NPC by their positions?
Thanks. 8)
Try the other option then - setShapeSegment() ;D
Thanks for your replies, I’ll give it a go 8)