lab1 base
This commit is contained in:
1 parent
bcc8782a99
commit
fcfa11c284
10 files changed
+142
No files matched your search
@@ -0,0 +1,19 @@
|
||||
using Code.Base;
|
||||
|
||||
namespace Code.Lab1
|
||||
{
|
||||
public class Flee : AgentBehaviour
|
||||
{
|
||||
public override Steering GetSteering()
|
||||
{
|
||||
var steering = new Steering
|
||||
{
|
||||
Linear = transform.position - target.transform.position
|
||||
};
|
||||
|
||||
steering.Linear.Normalize();
|
||||
steering.Linear *= Agent.maxAcceleration;
|
||||
return steering;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user