Jump to content

C++ Finding FPS Player in AABBDo


TonyF
 Share

Recommended Posts

I have been somewhat recreating the FPS player prefab into c++ class.

 

It has gone quite well and the movement and actions work fine at this stage.

 

I am currently working on my enemy class and noticed that i cant find my player in the "world->ForEachEntityInAABBDo". I have tried a few things but am really not having any luck.

 

My enitity has a mass, i tried adding a blank lua script to it, i created a mesh and parented it to the entity but i just cant get it to show up in the AABBDo.

 

Any advice on what i am doing wrong?

Link to comment
Share on other sites

Just writing this reply made me look at something i was overlooking the past 2 days.

 

In the callback there is an 'if (entity->GetClass() == Object::ModelClass)" and my entity is a pivot so now i can find it.

 

My problem was i created a mesh and parented to the pivot when i should of just attached the mesh as the base entity. So in my current setup i would have had to find the pivot and then check for child entities.

  • Upvote 1
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...