Forum rules - please read before posting.

Line of Sight integration or feature

edited September 2024 in Technical Q&A

Hi Chris

I'm looking at a project that would have a line of sight requirement. I love AC and now that I know it, as much as I know anything, I don't want to move to another engine.

A) Is there any chance you could add a line of sight option? Perhaps even as a paid function. This would have a raycast within a cone (either/both 2d or 3d depending on the nature of the game). If the raycast hits the player (or object with a certain Tag) then it triggers an actionlist. Options perhaps to have one raycast hit (ie if any of the player is visible) or a number of hits (to allow for more of the player to be visible).

or

B ) Do you know of any other assets that integrate with AC that do something similar?

I suppose my use case for this is that, while a Trigger around an NPC can be used, it's a fairly blunt tool by modern standards. It's a box or circle that the player would have to be in in order to trigger the response. You could have a circle or rectangle in front of the character, or coming from the characters head, but it's still a bit blunt. Having a guard react to where the player actually is, and for the player to have to avoid being "seen" in a more granular way seems to have it's uses.

Olly

Comments

  • AC integrates with Playmaker, which may be suitable.

    There already exists a Physics: Raycast Action, however, which works in 2D and 3D - have you given it a try?

    When it comes to potential new features, I find it better to examine the underlying issue that needs solving. Can you share more details on the exact situation you're dealing with?

  • Hi Chris

    Thanks. I haven't tried it as it's only part of a solution in that it will ray cast but light of sight is more about checking that within an adjustable cone of vision (forward facing but I guess not always). I'll take a look though as I am working on assumptions, having not looked at using that action (though I'm aware it was there).

    It's more about wrapping that functionality in to a deliverable experience for the coder, and thus the player. I see a number of posts over the years asking for that ability and figure it's probably worth looking at it. I can see a few contexts where it might be useful with NPC Ai and player responses.

    Olly

  • I'll give it some thought. But any details you can share on the contexts you mention will help me make more informed choices about a possible implementation.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.