#include "FixedHeightConstraint.h" #include "GameObject.h" #include "../../Common/Vector3.h" #include "../../Common/Maths.h" using namespace NCL; using namespace CSC8503; FixedHeightConstraint::FixedHeightConstraint(GameObject* _object, const float heightValue) { object = _object; height = heightValue; } void FixedHeightConstraint::UpdateConstraint(float dt) { Vector3 position = object->GetTransform().GetPosition(); position.y = height; object->GetTransform().SetPosition(position); }