Answer the question
In order to leave comments, you need to log in
How to make enemy movement code (Unity + C#)?
I made an enemy movement code on curatins, I realized that this is all wrong. Tell me how to do the code (at least just in 1 direction) correctly. Worth a gamertag.
Answer the question
In order to leave comments, you need to log in
only from the comments it became clear that you need a kind of "PATROL".
from point to point route and vice versa.
since there is no more detailed description of the task, then for a start - on the crowns is quite an option.
if you need a more universal option and more complex routes, then either study, invent and write (for experience and all that, you will do it after a while, the very essence and logic there is obvious, I don’t even know what to suggest, then you need to *)
or take plugin, the same Simple Waypoint System (sws) and make on it.
*
actually about logic. array of points. from one to the other we interpolate taking into account the speed.
here you can drag a curve (using a formula or set via AnimationCurve)
change in speed - you can also optionally shove it along a curve, along an animation, linear ...
in the end - you want to rake and learn to code. and if you want - look at some simple tweener or a more sophisticated plugin.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question