Jump to content

Recommended Posts

Posted

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.

C++ :3

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...