0 Favourites

Any plans to upgrade The Line of Sight For C3 or even C2?

  • Hi Ashley

    Do you have any plans to upgrade The Line of Sight For C3 or even C2?

    Because at the moment is not possible to use it in all the projects even if I really try hard to make it work, this is one of the behaviors that I like most especially because you did a really good job in optimizing it but I'm having a really hard time to make it work in my current project, at last not without doing many extra workarounds Events checking Distances which hurt quite a lot the performance unnecessary just to check if is in the Range that I exactly need.

    At the moment The Line of sight works by checking from Example the first object Origin points 0 to the next Object Origin point 0, this seems pretty unlogic for me as if I wanna make some Actions to happen when whichever object is in range of another object lets say (100 pixel Range) then unless all the objects have the same size this will not work as intended, this means if I have many different objects that regularly grow up or go down in size I will have to make events and actions just to keep adjusting the line of sights of each object just to have that is in range of 100 pixels for each object the same but even doing all this it doesn't work why? I will show you in some pictures at the end of this post so you can see what I mean, so this means that you cannot have, say is in 100 Range equal for all the objects if they have different sizes

    What would be the best is to have both options the one that we have now which is checking from origin points 0 or a new option where includes checking from the (origin points 0+object size) so this way doesn't matter how big or small is the size of the objects still will detect at 100-pixel range accurately without any extra events or crazy setups, as I tried to replicate the line of sight by myself before posting this and I used checking by distances and it hurts really badly the Cpu


    Let's take as example the same I wanna detect any object that is in Range of another object of 100 pixels Range do something

    This is what happens to me all the time now

    The Blue object detects the reed but it doesn't detect the Green-wich is fully smashing his body into him but no detection happens here is like a ghost that is pretty unlogic for me, and for the Green object the same detects the reed but not the Blue same story.


    The Ideal and most Logic will be like this:

    all tree objects are separated by 100 pixels distances and they are all detecting the one that has next to him.

    Green detects Blue

    Red detects blue

    Blue detects both green and red


    Do you think this will be Ever possible to implement? will save a lot of headaches, Time and performance as it will not require adding any extra events from our side, just by Adding one more option to the Line of sight so everyone can have the possibility to check or uncheck the option he needs either from (Origin point) or either from (Origin poin+size)

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • Why not add the size of the object to the LOS range yourself?

  • Why not add the size of the object to the LOS range yourself?

    Hi Ashley

    Well, I have been trying to do that for the last 6 month and many more things, please can you show me how you do it if is that simple? because I'm definitely doing something wrong

    Here is a simple example adding the size of the objects to the LOS like you say and still not working


    And here is another example without the line of sight which is working perfectly, so how do you do exactly this with the line of sight? That's all I'm asking I don't mind to add sizes or anything really as longs as I get the same results


  • Well, if the behavior had this built-in, it'd probably just add min(Self.Width, Self.Height) / 2 to the LOS range. If that doesn't fix it, I'm not sure what you want the LOS behavior to do instead?

  • Well, if the behavior had this built-in, it'd probably just add min(Self.Width, Self.Height) / 2 to the LOS range. If that doesn't fix it, I'm not sure what you want the LOS behavior to do instead?

    Ashley First Thanks for your time I know you must have a pretty busy life with the launch of C3 and I really appreciate your time on checking this

    For me will be enough if there was an extra option with the Line Of sight where I could just check that box and add the Range say 300 and that's it without the need of making extra subevents checkings distances + sizes etc.... like on my second capx when I say 300 Range it applies to all the objects equal doesn't matter how big or small the objects are on both sides if the (Gap between) object1 and object2 is 300 then is on Range.

    Is like saying if the distance (between the Gap) of shape1 and shape2 is 300 then is detected. That will simulate more a real-world scenario.

    The Line of sight That we have now is working great for many different Games like platform or any other because don't need to have that precision, but many other Games need to have more precision and more control for when the Action they gonna take place if I would have to use the line of sight like we have now, it would work more as a Ramdon because one object will be in Range at 300 other at 170 other 50 etc.... Meaning no control at all for what is happening in the Game and that leads to an Ai broken.

    I could just use and I wouldn't mind using the set up that I did on my second capx but when you have 50 to 100 or more objects on the screen checking distances putting the Cpu to the roofs and causing the Fps drops doesn't look that good especially if is for Mobile Game

    The Reason why I found this is a good time to ask for this is that you are still working to improve C3 and making changes so I think is a good opportunity to upgrade some behaviors like this. I have C3 license that I haven't use it yet and definitely, something like this will make me jump on C3.

    I'm not sure if it's only me that I have this problem or are others with the same problem but you always say show me the proof so I gave you just a small test of a bigger picture and I think I gave you enough evidence to back up my case and to make the point that indeed this feature is needed. And now I leave you in your hands to decide if people using your Engines needs this or not or they have to work with some limitations.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)