Jump to content

GetChild() and picking


Rick
 Share

Recommended Posts

I have floor segments (made from csg) and in the center of each floor segment I have a pivot. In the scene hierarchy the pivot is a child of the floor segment.

 

floor

--->center_pivot

 

 

When I pick the floor segment I use pickinfo.entity->GetChild(0) to get the pivot at the center, but it returns NULL. Shouldn't this return the child pivot?

 

 

I know it's picking the floor correctly because I put a sphere at the pick location and the sphere is in the right location.

 

 

Entity* sphere = Model::Sphere();

sphere->SetPosition(pickinfo.position);

Link to comment
Share on other sites

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.

 Share

×
×
  • Create New...