Support Forum

Is it possible penalty to moving GameObject?

Hi, Aron.
First of all, THX to your great unity asset.

I have some question.

The situation is like this.

I made a graph with a recast graph.
My Player (hereinafter referred to as “Hero”) and Enemy can walking around it.

Of course, Enemy chase Hero.

“Hero” carries some gameObjects its back for Enemy can`t walking through it.
(hereinafter referred to as “Hero Obstacles”)

Enemy is using RichAi.

The important thing is
“Hero” and “Hero Obstacles” are can move

Yes. as you can imagin
the shape is like this picture.

AStart_Desc_ScreenShot

I want to give some Penalty to the “Hero Obstacles” so that Enemy can’t pass by.

Use navmeshcut component?

I already test it. :frowning:
But If Enemy’s position is located within the Navmeshcut of Hero Obstacles.

then Enemy’s movement is somewhat strange.

It means that it’s unnatural.
It’s too hard.
even Enemy’s suddenly moving to a nearby location.

Even if it’s a small idea, it’s okay.
I hope you can help me.

I’ll say thank you first.

I hope you have a good day. :smiley:

Hi

This is not easily achievable.

The best solution I can think of is to use local avoidance, but adjust the avoidance layers so that enemies avoid the player, but the player ignores enemies. Wouldn’t be perfect though.