Collision detection with AI enemies

This forum is currently in read-only mode.
From the Asset Store
Detects any kind of ad blocker. Very easy implementation into already existing projects
  • Yo!

    Still trying to come up with a nice collision detection system for the little baddies that are running after my character, in a top view Link to the past style game.

    I'm wondering if an 8-direction behavior could be overridden with events that would enter "fake" inputs. The collision detection works so nicely with that behavior.

    Is there a way to replicate that quality of coll detection on another object like a potential enemy?

    In my .cap I tried to recalculate the position of the enemy at every tick when colliding with a box but I have no idea how to get the actual angle of the surface my baddie is colliding with, so that the baddie would "rebounce" in the right angle.

    You can see that my system works well with a vertical wall, but not at all with a horizontal wall.

    http://dl.dropbox.com/u/38319441/CollisionTest.cap

    Thanks a bunch!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you're going for top down, RTS is very good and easy to use. It finds the path automatically and collides with solid objects.

    I use it for top-down AI and, in platforming games, flying AI. :)

  • <img src="http://4.bp.blogspot.com/-hyMITwTBuss/TXT-QA7hfWI/AAAAAAAAAJI/hnh4IoMkZ2Q/s1600/HeadExplodeBig.gif" border="0" />

    And it was right in my face all along...

    Thanks a lot!

    When I set Pathfinding to Off or Custom, he seems to got right through solid objects... hmmm.

  • Indeed.

    It is the way it is supposed to. Off turns the collision off, and custom requires you to set the action "Add pathfinding obstacle" for it to make a map of obstacles.

    Source: Scirra wiki

    A must read

    Have fun :D

  • Oh ok so you're saying RTS either goes through solid object or pathfinds its way around it. That'll have to do it's the best I've...

    FOUND BETTER!

    Custom movement

    Every tick

    Sprite Bouce off Box (friction 0,5)

    Sprite Set speed: 100 toward Target

    Thanks guys!

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