MexSource Posted May 4, 2014 Share Posted May 4, 2014 Hey, I think the camera pick is no longer working properly, other people also have this issue. This is the code i tried it with: if (wd->KeyHit(Key::E)){ Vec2 mousepos = wd->GetMousePosition(); if (cam->Pick(mousepos.x, mousepos.y, pickinfo, 0)){ if (pickinfo.entity->GetKeyValue("tag") == "dbutton"){ //pickinfo.entity->SetKeyValue("tag", ""); System::Print("Entity picked, distance: " + String(pickinfo.distance)); pickinfo.entity->Hide(); } } } My problems are: The pick is only working if I'm so close to the object, that I'm touching it. And the pickdistance is everytime -1 Hope you can fix that. Btw: I tried picking csg boxes and models (Yes, I attached a empty lua script to these boxes). If you need more info here is the full thread in which some people and me discussed this. Quote C++ :3 Link to comment Share on other sites More sharing options...
Josh Posted May 10, 2014 Share Posted May 10, 2014 The example game is working correctly, as well as the code example here: http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/camera/camerapick-r199 If you can demonstrate a problem please provide a complete working example I can run. Otherwise it's impossible to try to recreate your situation. Quote My job is to make tools you love, with the features you want, and performance you can't live without. 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.