Jump to content

Recommended Posts

Posted

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?

 

FWoYGX2.jpg

 

 

It's so bad that it will even pick the terrain that's far off in the distance before it even considers the tree.

Posted

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).

Posted

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.

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...