diff options
| author | Lars Müller <34514239+appgurueu@users.noreply.github.com> | 2022-10-30 16:53:14 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-30 16:53:14 +0100 |
| commit | 077627181ee2eac3c0dacc3d8dc49825837e474c (patch) | |
| tree | a8a6298198738f2edb30bd7e733a7a0d2005affa /src/util/pointedthing.h | |
| parent | b8292319924994352d56d6111faa73fe315d149a (diff) | |
| download | minetest-077627181ee2eac3c0dacc3d8dc49825837e474c.tar.xz | |
Allow rotating entity selectionboxes (#12379)
Diffstat (limited to 'src/util/pointedthing.h')
| -rw-r--r-- | src/util/pointedthing.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/util/pointedthing.h b/src/util/pointedthing.h index 68b183195..e4f2eb20c 100644 --- a/src/util/pointedthing.h +++ b/src/util/pointedthing.h @@ -74,7 +74,12 @@ struct PointedThing * This is perpendicular to the face the ray hits, * points outside of the box and it's length is 1. */ - v3s16 intersection_normal; + v3f intersection_normal; + /*! + * Only valid if type is POINTEDTHING_OBJECT. + * Raw normal vector of the intersection before applying rotation. + */ + v3f raw_intersection_normal; /*! * Only valid if type isn't POINTEDTHING_NONE. * Indicates which selection box is selected, if there are more of them. @@ -90,10 +95,10 @@ struct PointedThing PointedThing() = default; //! Constructor for POINTEDTHING_NODE PointedThing(const v3s16 &under, const v3s16 &above, - const v3s16 &real_under, const v3f &point, const v3s16 &normal, + const v3s16 &real_under, const v3f &point, const v3f &normal, u16 box_id, f32 distSq); //! Constructor for POINTEDTHING_OBJECT - PointedThing(u16 id, const v3f &point, const v3s16 &normal, f32 distSq); + PointedThing(u16 id, const v3f &point, const v3f &normal, const v3f &raw_normal, f32 distSq); std::string dump() const; void serialize(std::ostream &os) const; void deSerialize(std::istream &is); |
