Is there a way to set "angle of motion" on created for pathfinding behavior?

Not favoritedFavorited Favorited 0 favourites
  • 5 posts
From the Asset Store
3D Car Pack 1
$2.99 USD
3D models + Rendered Low-Poly Cars in isometric, top-down, and side angles.
  • Hi,

    Is there a way to set "angle of motion" for an object "on created"? Bullet behavior has it; I can't seem to find the same for pathfinding.

    Thanks in advance!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The Pathfinding object doesn't move immediately upon creation. There’s no motion - and therefore no angle of motion. You can simply set the object's angle instead.

  • I can't change the angle of units, unfortunately.

    I fixed it with another method. I added an object with fade behavior. Unit spawns, fade-out starts, and the object gets destroyed. Child count goes from 3 to 2. I filtered my mirror condition with child count 2. This gives me 0.5 secs, which is enough to cover my tracks. :)

    Thank you, dop2000.

  • Not sure how any of that is related to setting an angle of motion. But I'm glad it works :)

  • This is the mirroring part. "mirror_fragments_clock" is basically an analog watch. So every time the clock hits, I check if the sprite is moving left or right. So the problem was, when an enemy unit was created on the right side of the screen, the mirror code checked for the unit's pathfinding angle. Since all objects were created with 0 degrees, they were facing right for a moment, even though they were moving left. I solved it as I said, but that was the root of the problem.

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