2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-10 07:07:42 +00:00

Fix Thardus' structure and implement basic behavior

This commit is contained in:
2020-09-06 17:18:46 -07:00
parent 2ca0cd2bdd
commit fb69ae741d
6 changed files with 404 additions and 48 deletions

View File

@@ -93,7 +93,7 @@ zeus::CVector2f CSteeringBehaviors::Flee2D(const CPhysicsActor& actor, const zeu
return actor.GetTransform().basis[1].toVec2f();
}
zeus::CVector2f CSteeringBehaviors::Arrival2D(const CPhysicsActor& actor, const zeus::CVector2f& v0, float f1) const {
zeus::CVector2f CSteeringBehaviors::Arrival2D(const CPhysicsActor& actor, const zeus::CVector2f& v0) const {
zeus::CVector2f diffVec = v0 - actor.GetTranslation().toVec2f();
if (diffVec.magSquared() > FLT_EPSILON)
return diffVec.normalized();