Jump to content

Recommended Posts

Posted

Is there a way to use GetEntityKey on a picked entity?

 

I've set the key on an entity and can successfully get it back if I ask for it directly, but trying to use CameraPick and the following code

 

GetEntityKey(pick.entity,"id")

 

returns an empty string (NULL?). Am I doing anything wrong or is that not meant to work?

 

(If I do HideEntity(pick.entity) it works fine too so I know I've selected the right entity.)

Posted

because when you set the key, you probably set it to the model... whereas raycasting only works with meshes and terrains... the pick entity is a mesh and is a child of the model...

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Posted

I'd assume it's for every entity within a given AABB volume so Models, Meshes, Bodies in fact anything that derives its pointer from a TEntity type.

 

But I don't know for a fact, I've never actually tried this as I seem to recollect it calls a user defined callback for the returned targets.

Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++

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