| 1812 | needs_set_inactive(false) {} |
| 1813 | |
| 1814 | void PlantComponent::HandleCollision(const vec3& position, const vec3& velocity) { |
| 1815 | vec3 impulse = cross(normalize(position), velocity) * 0.01f; |
| 1816 | ang_vel = impulse + ang_vel; |
| 1817 | plant_shake = min(1.0f, plant_shake + length(impulse) * 1.0f); |
| 1818 | } |
| 1819 | |
| 1820 | mat4 PlantComponent::GetTransform(float scale) const { |
| 1821 | mat4 rotation; |
no test coverage detected