Physical collisions with zero gravity [solved]

Northfield82

  • Posts: 649
Hello,

I'm making a vertical 'shooter' type game like the old-style Commando game.  I want the Actors to be able to collide with the Player as when they do, they then attack i.e with a sword.

If I have an enemy actor not moving and the player runs into him he currently flies off screen because there is no gravity.  How do I allow physical collisions in this style of vertical game so they rebound a little  without flying off into space?

Thanks

« Last Edit: December 29, 2014, 04:29:28 am by Northfield82 »

LIBERADO

  • *
  • Posts: 2720

How do I allow physical collisions in this style of vertical game so they rebound a little  without flying off into space?
Add this code to your enemy actors:
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

Northfield82

  • Posts: 649
Thanks, that works. 

I see in the Physics Tab it has a maximum of 1, yet I've put it as 2?

LIBERADO

  • *
  • Posts: 2720
 :)  Put the number that provides the best result for you.

« Last Edit: December 28, 2014, 06:22:28 am by LIBERADO »
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

Northfield82

  • Posts: 649
That has worked for when they are stood still, is there a way to make it so if I leave the Player Actor stood still and the Enemy Actor collides into him, the Enemy Actors have  some force so they can push him around a bit?

The effect I am looking for to make them 'bump against each other', as if to adults were running into each other.

LIBERADO

  • *
  • Posts: 2720
In the Physics Tab, set to 0 the Bounciness, and try to increase the Mass value of the enemy actors.
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.