HeroEngine Forums

HeroEngine Support => Scripting & Programming => Topic started by: fgonzalez on Dec 13, 10, 06:18:15 AM

Title: [Resolved] Getting targets inside a box
Post by: fgonzalez on Dec 13, 10, 06:18:15 AM
I wondered if there is any way to rotate the box built via GetTargetsInBox function in order to perform a proper point & click system with squared selection areas (I would like the box to be always parallel to the camera).

Thanks beforehand
Title: Re: Getting targets inside a box
Post by: HE-JAY on Dec 13, 10, 02:17:51 PM
The GetTargetsIn{Object} suite of external functions is world axis-aligned and thus should only be used to query for players or npcs from the perspective of the world (as opposed to that of the camera or the player).  These functions are most commonly used to gather information about what characters are 'in the general vicinity of' the point in question in order to establish a set of data points to work with.

In your particular case, it is likely that you will have to establish your own mapping using the camera's (or character's) orientation vector and the destination click location on the client, then sending this information to the server to be processed.

If your intention is to create a pathfinding or navigation system, note that HeroEngine does include NavMesh generation and this can be leveraged to assist in creating a point and click system.

Does this answer your question? If not, feel free to expand upon it.