Search Unity

Question How Can I deal a Damage Deal with NavMesh ? in a Doom's vibe game?

Discussion in 'Navigation' started by RisingScope75, Mar 13, 2024.

?

Damage Deal with NavMesh ?

  1. I prefer to keep the 2D spriterender in the child's object, because I want to make a Doom's vibes.

    100.0%
  2. I want to get the Decouple code way I am looking for

    0 vote(s)
    0.0%
  3. I use AI navemesh component in the parents game objects.

    0 vote(s)
    0.0%
  1. RisingScope75

    RisingScope75

    Joined:
    Jan 5, 2023
    Posts:
    38
    Here youtube's video :


    I am using "NavMesh" agent in my root parent's enemy game entity to Move the character and also a move script to catch the navmesh agent... the problem I got, is the entity can not receive damage (even if I check the trigger-on-off) and (even if I check the layers and tag)... I am not sure why this zombie can not take damage. , the "HealhcontrollerZombie.cs" , allows reveive damage from player. the Player has a "leg" child's game object to deal damage to zombie and not receive any damage.

    Here's attached some picture dooma3.png dooma4.png to introduce the settings

    Notice that
    1. I use 3D model...but , but ,but I disable the render (except for the player) the Mesh3D render...and put a "child" in the root (player or zombie) and those childs ...have a "spriterender" to catch the sprite of the enity (zombie or player) and represent the entity ...such a fake 3D!! it is important for me to get the sprite in the child.. (because I can not put sprite render in a parent , because the parent has the the 3D mesh hidden.