Hello, I’m kinda noob when it comes to coding so please bear with me. I’m making a maze game where there are zombies and of course your own character (human) but I don’t know how to put the zombie sprite. Am I supposed to make a new entity or not? Also, how can I make them move without using keyboard controls? Like if there is a certain distance that’s been met, they’re gonna attack you. Also, my idea is that the “human” can get a slice of meat to feed the zombie so that zombies will not attack you while walking in their direction, How can I do that?
Here’s the link thank you very much:
Hi @Maristotle! I think you need a new entity for your zombie with a collision and rigidbody component. There are a couple of ways to move an entity. If you are using a kinematic rigidbody you have better control with your script. If you use a dynamic rigidbody the entity react automatic on other rigidbodies.
Moving a kinematic rigidbody:
Moving a dynamic rigidbody:
To move the zombie in the direction of the player you can use for example the
lookAt function. To check if there is some meat in range you can use for example the
thank you very much! I’ll try this at once