finish hook alert for new entity collision shape

This commit is contained in:
Andrew Meadows 2016-07-15 15:56:52 -07:00
parent b2dfa49a6f
commit 499150bbed
2 changed files with 5 additions and 1 deletions

View file

@ -917,6 +917,10 @@ void RenderableModelEntityItem::computeShapeInfo(ShapeInfo& info) {
}
}
void RenderableModelEntityItem::setCollisionShape(const btCollisionShape* shape) {
// TODO: generate collision mesh and update _model
}
bool RenderableModelEntityItem::contains(const glm::vec3& point) const {
if (EntityItem::contains(point) && _model && _model->isCollisionLoaded()) {
return _model->getCollisionFBXGeometry().convexHullContains(worldToEntity(point));

View file

@ -61,7 +61,7 @@ public:
virtual bool isReadyToComputeShape() override;
virtual void computeShapeInfo(ShapeInfo& info) override;
void setCollisionShape(const btCollisionShape* shape) override {}
void setCollisionShape(const btCollisionShape* shape) override;
virtual bool contains(const glm::vec3& point) const override;