how to make ghostcharacter(enemy) crawl on sidewalls and walk on upper wall inversley???

i have ghost charecter (enemy) with wall run crawl animations…i want make him crawl and wall on sidewalls instead of floor…so,how i can do???..ya,like spider man…just,i want to do this,to make enemy more fearer.

You could create an Animator Controller and add the animations you got there and the transitions between them. Set the parameters you think you’ll need to trandition from one animation to the other.

In your character create an Animator Componene and add the Animator Controller you’ve just created. Also, be sure to mark “Apply Root Motion” as false. You’ll want to control the character movement yourself.

Lastly, you have to create a script on the character to control the movement and position on the character while changing the blending parameters on the Animator Controller to create a smooth transition.

Since you didn’t explained fully what kind of game you are creating I can’t provide you with any code. So, instead you can try and look in some of these resources that explain some of the thing I breeze through here:

Unity Docs: Animator Controller

Unity Tutorials: Animator Controller

I think by fearer you mean scary’er :). Anyway we are here for answers not grammar correcting :).

To answer your question is a bit tricky, because it all depends on whether you use physix or not. If the enemy only needs to crawl the wall on special events it might be easier to just animate it, but! If it is the standard behavior of an enemy, you need to think in the direction of navmesh (pro) or write your own script that detects walls and then transforms the position of the enemy along that wall.

A way to do this is with a siple Tag on the wall called wall(for just being easy :p) then you can write a script for your enemy that as an OnColliderEnter function and an if statement detecting that wall’s name. Then if it is detected write the part that makes your enemy go up.

Now good luck and make them fear your beast:)