Line of Sight detection

Discussion and feedback on Construct 2

Post » Sun Feb 19, 2017 1:53 am

i have simple question. do line of sight detects the collision box of an object or just the image point of the object?

i am trying to detect if there are walls ahead of my ai and i am having trouble on thick walls that my line of sight cannot reach.

ps.
especially on walls/solid objects that has irregular shape and arcs
Last edited by kururugi66 on Sun Feb 19, 2017 1:55 am, edited 1 time in total.
B
18
S
2
Posts: 13
Reputation: 794

Post » Mon Feb 20, 2017 12:58 pm

I made a template for line of sight that uses a bounding box. I will make an example in the template to show how it can be done.
Link: free-template-ai-for-side-scroller_t187819
Free code for all
B
23
S
7
G
4
Posts: 60
Reputation: 4,924

Post » Fri Mar 03, 2017 11:56 am

thanks @Reuben. though i solved the problem by making an invisible sprite which will serve as bounding box detector. it was good alternative but not for long distance detection. hope you will able to finish your template to help others with same problem :)
B
18
S
2
Posts: 13
Reputation: 794


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 18 guests