Jump to content

Search the Community

Showing results for tags 'anglebetween'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 1 result

  1. Hi Guys I'm working on a top down shooter. I have AI that uses angleBetween to face the direction of enemies when they spawn. The game uses a tilemap with some collisions randomly spawned around the map. Is there a way that I can detect if there's a collision layer blocking the path between my AI and enemy sprites? I don't want my AI to mindlessly fire their weapon if the enemy is behind a wall. in my AI.js I have: AI.Prototype.update = function() { ... this.rotation = game.physics.arcade.angleBetween(this, this.closestEnemy); ... **Checks if enemy exists on map, uses Phaser weapon plugin** this.pistol.fire(); }; Would I need to implement pathfinding to check if there's a direct path before firing or is there an easier way to go about this?
  • Create New...