22 const auto& world_transform = transform.get_transform_global();
23 float cylinder_half_height = (data.get_height() - 2.0f * data.get_radius()) * 0.5f;
24 if(cylinder_half_height < 0.0f)
26 cylinder_half_height = 0.0f;
28 math::vec3 capsule_center = data.get_center();
29 math::vec3 up{0.0f, 1.0f, 0.0f};
30 auto top = capsule_center + up * cylinder_half_height;
31 auto bottom = capsule_center - up * cylinder_half_height;
33 auto trans = world_transform;
Class representing a camera. Contains functionality for manipulating and updating a camera....
Component for character controller physics with sweep-based movement.
auto get_owner() const noexcept -> entt::const_handle
Gets the owner of the component.
auto as_derived(meta_any &obj) -> bool
auto to_bx(const glm::vec3 &data) -> bx::Vec3
void setColor(uint32_t _abgr)
void setWireframe(bool _wireframe)
void pushTransform(const void *_mtx)
void drawCapsule(const bx::Vec3 &_from, const bx::Vec3 &_to, float _radius)
void draw(rtti::context &ctx, entt::meta_any &var, const camera &cam, gfx::dd_raii &dd, dd_2d_raii &dd_2d) override
void draw_billboard(rtti::context &ctx, entt::meta_any &var, const camera &cam, gfx::dd_raii &dd) override