Line of Sight behavior - changing the cone view angle

0 favourites
  • 4 posts
From the Asset Store
solution for games like "fruit ninja" and drawing applications
  • I'm trying to create a traffic system where cars stop when they see another.

    So if you have a 4-way junction, and you use LoS, the car seems to only check it from one direction. In this case, using 360 cone is not an option.

    Is there a way to set which angle the cone of view must check? or an alternative to LoS? It seems to be 'default' to 0.

    So when you copy-paste the cars and set their angle to 0, 90, 180, and 270 for all traffic directions, some cars 'see' the other cars in time but others don't. I assume it has to do with the cone.

    Also, if the latter is solvable, is there a more simple way to get the cars moving again once they stop? I mean in the proper order of course.

    I thought this was easy to set up, but now it's giving me a headache, so to speak.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The issue is not necessarily the cone, when people start to pick with multiple instances it can cause issues unless the events are tight. The cone of view points in the direction that the object is facing, it doesn't default to anything but an object may default to angle 0.

  • OK, so if I insert a sprite, with the car facing right, and rotate it 90 degrees then the cone of view would turn 90 degrees along with it? What do you mean by tight though? That the events are programmed in a specific way?

  • Yes often things that are working and look good in events for one instance go wrong when you introduce multiple instances to pick from randomly. Events should work in a certain way to avoid bugs. Yes if you set it to angle 90 it will face down and so will the LOS.

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