martyj Posted January 11, 2016 Share Posted January 11, 2016 So I have an entity that I'm trying to use the Camera->Pick on. I am picking the entity at the center of the screen, and no matter what I do, it always chooses objects behind the entity that I am looking at. Whether I set closest to true, pick radius to a number, or default of 0. this->camera->Pick(centerOfScreen.x, centerOfScreen.y, pickInfo, 0.0f, false); How should the entity be setup so I can pick it? It's so bad that it will even pick the terrain that's far off in the distance before it even considers the tree. Quote Link to comment Share on other sites More sharing options...
Slastraf Posted January 11, 2016 Share Posted January 11, 2016 Check if the entity you want to pick has a script, if yes , check if it has self.entity:SetPickMode([insert pickmode here]) in the start function if there already is one then just remove it, it should be pickable by default (if no then put it in the start function). Quote Link to comment Share on other sites More sharing options...
martyj Posted January 11, 2016 Author Share Posted January 11, 2016 The PickMode is the default behavior for an entity. The other objects that I can select, have a default PickMode as well. I can't actually find a difference in this object compared to other entity objects, except maybe the Collision Type. But the default collision mask is 0, so it shouldn't be checking for that. Quote Link to comment Share on other sites More sharing options...
Rick Posted January 12, 2016 Share Posted January 12, 2016 Change that boolean property to true and try it. http://www.leadwerks.com/werkspace/page/api-reference/_/camera/camerapick-r199 Quote Link to comment Share on other sites More sharing options...
Einlander Posted January 12, 2016 Share Posted January 12, 2016 Yep, setting it to true will fix that. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.