3 #include "../behaviour.h"
4 #include "../stage_node_behaviour.h"
5 #include "../../generic/managed.h"
23 void late_update(
float dt)
override {
28 target_->absolute_position() - stage_node->absolute_position()
35 auto d = std::abs(dir.dot(Vec3::POSITIVE_Y));
36 if(almost_equal(d, 1.0f)) {
40 dir = up_plane.project(dir).normalized();
42 auto rot = forward_.rotation_to(dir);
43 stage_node->rotate_to_absolute(rot);
47 const char* name()
const override {
48 return "cylindrical_billboard";