line of sight in paralax layer

0 favourites
  • 7 posts
From the Asset Store
solution for games like "fruit ninja" and drawing applications
  • Hello, just now I ran into this problem with distortion and wonder if there even is a solution.

    I'm using several layers of paralax background, and in one of the background layers I have creatures with line of sight. Problem is, the paralax movement doesn't apply on the center of their view, nor their actual presence at all in fact. When my player has line of sight, it again notices the position of the creature on place where it would be if it weren't in the paralax layer

    Im using a "bulet" function for the movement of the creatures.

    I tried this. I turned off the paralax effect and I assigned different moving speed of the bullet to the left and right movement keys. But this did not gave me satisfactory results. And The bullet of course behaved differently when I got to the end of the level and camera stopped scrolling.

    thank you in advance for any help

  • Although it is difficult to determine your problem from the description alone, you might try pinning an "eye" placeholder sprite to the monster check line of sight from. You can use that to debug where exactly on the screen the eye is and what is and isn't in line of sight.

  • Thank you ossy,

    I've thought about this.

    However, i know the approximate position of the actual line of sight position. I have the idea of where it is and where it should be. It creates a field under the creature and my character gets transparent when he steps into that field. But when I take the creature layer and set lower paralax value, lower than the value of the layer my character is in, the field moves in different speed than the creature. My character is seen somewhere else than the creature is present, and the distance eventually changes as I move around the level. As the displacement caused by the paralax scrolling messes with the position more and more.

    Does this make sense?

    Should I upload capx?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think I understand, but it would be easier to make sure with a capx. It sounds like you just need to put the line of sight field object on the same layer as the monster.

  • The field is the cone of view


  • Link truncated, break off the https://www part?

  • oh, haven't notice... fixed

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