Physics question - blocking/slowing enemies

0 favourites
  • 4 posts
From the Asset Store
Pixel Enemies for SHMUP consists of 38 enemy ship sprites to be used in your game.
  • Hello again,

    1.) So I've gotten the top-down physics to work -relatively- well, though even with highest friction and dampening settings, large objects with high density still slide around a little too much. Is there a way to make items not seem like they are on ice in top-down view?

    2.) Also, is there a way to make an enemy slow down when pushing an object? So for example, if the player shoves a sofa in front of a zombie, and the zombie runs into it to get to the player, right now the zombie just plows through it and shoves it out of the way. I'd rather like to have the couch slow the zombie down as the zombie 'struggles' to get past it. Zombies currently use the bullet behavior for movement and every tick they rotate towards the player.

    3.)Further, is there a way to make an object just block other moving objects all-together while remaining moveable? For example, a fridge that the player can push in front of a doorway that blocks zombies from entering.

    I've been looking through tutorials and examples, but haven't really found much in regards to these types of things.

    4.) Another problem I am having is figuring out how to properly apply impulses. Say I have a giant monster. When he collides with aformenioned sofa, I want the sofa to go flying, and I figure applying an impulse would work. However, I am unable to figure out how to apply an impulse at an angle depending on the angle of the monster. Basically I want the sofa (or other furniture) to essentially be thrown away from the monster upon contact.

    Any information/suggestions/feedback is greatly appreciated!

    Thanks again!

  • top-down?... why physics?

  • Right now, with the current physics, it makes the environment more dynamic and interesting for game play. It's fun watching zombies toss aside chairs and tables to get at the player, or the player pushing a fridge in front of a volley of enemy projectiles. I just want to improve upon the functionality as well as expand my own knowledge of how these all work.

    Also, why not? Top-down physics are even included in one of the examples that ship with the software.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Alright, I hadn't tried this example, makes more sens when you interact with the little HTML5 logo.

    for 1 and 2 I'd say you can always play around with VelocityX and VelocityY

    They are vector component you can get and set as you want.

    for 3 you can dynamically switch the blocked door to immoveable depending on the context (eg: there's a fridge in front).

    for 4 apply impulse at angle angle(monster.X,monster.Y,sofa.X,sofa.Y)

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