How do I use physics in a ratio?

0 favourites
  • 4 posts
From the Asset Store
Simple yet very life-like rag doll made with Physics!
  • Hi, I have a physics problem, how can I make a wave impulse around a character? I want the monsters that are nearby to be pushed back away. Or another example, the world gravity in negative, rejecting all the objects in different directions .

    If i add physics behavior to the tilemap , the monsters cannot follow my character. Also, if i activate the physics behavior from disable to enable at the collision to the character skill, they will be affected by gravity falling down.

  • What behavior are you using for monsters movement? If it's 8-direction, then I don't recommend mixing it with Physics. Instead, use "8direction set vector X/Y" or "8direction simulate control" actions.

    For example:

    set variable a to angle(player.x, player.y, enemy.x, enemy.y)
    Enemy set vector x to (player.X+200*cos(a))
    Enemy set vector Y to (player.Y+200*sin(a))
    

    Or, you can add Bullet behavior to enemies. When you need to push enemies away from the player, set Bullet enabled, speed=200 and acceleration=-200 (note, it's a negative value), set bullet angle of motion to angle(player.x, player.y, enemy.x, enemy.y)

  • dop2000

    Already tried with bullet speed and acceleration, but not with bullet angle of motion,it works!! thanks for that action =) i liked that effect a lot.

    So, physics behavior is not recomended for an rpg game in construct?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It's not recommended to mix Physics with other behaviors (Pin, Solid, Bullet etc.). You can have them in one game, but you need to be careful to make sure they are not in conflict with each other.

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