Falling enemy

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Asthmar

I’m working on a mouse shooter and would like to know how I would go about falling enemies.

I have an enemy that spawns, then follows the player, but I would instead like them to spawn by falling into the screen ( with a shadow to indicate where they are landing) and land on the ground. My game is not a platformer so I can’t use the “is on floor” function. Its a 2d top down and I can’t seem to figure out how I would do this. Hoping someone can point me in the right direction here.

Here is an example gif of what Im going for : Unity-2016-12-09-09-18-15-46-1 hosted at ImgBB — ImgBB

My game is 2d and the enemies are kinematic bodies

:bust_in_silhouette: Reply From: Vignesh S
  1. Just choose random spawn points on the dungeon floor.
  2. Spawn shadows in those places.
  3. Make the enemies translate from off screen to the shadow position (just translate y)
    Important without collision or collision deactivated.
  4. Once the enemies reach the shadow point activate the collision and enemy behaviour.