MikalDev / mikal_rotate_shape

Construct 3 Behavior to rotate objects in x,y,z
MIT License
1 stars 2 forks source link

bbox misaligned, rotated object are hidden depending on how they are viewed #2

Open F3der1co opened 1 month ago

F3der1co commented 1 month ago

It seems like the bbox is not rotated, this means that often the object will not be rendered when it should depending on the viewing angle. In the 3d object addon this problem is mostly (depends on where the origin is) fixed, I hope a similar technique could be used here.

MikalDev commented 1 month ago

Took a look at it, I can't use the same technique as 3DObject, because 3DObject render is decoupled from the boundingQuad, so it can be set to arbitrary values compared to 3DObject.

In the case of 3D Shape, the render size is tied to the boundingQuad, as the boundingQuad is changed or updated, the size of the bounding box seems to change.

That being said, when 3D Shape rotates using the original ACE, it does seem to decouple bounding box vs the rotated 3DShape size, so there seems to be some internal way to at least handle the z angle rotation. If anyone else has ideas, open to PR.

skymen commented 1 month ago

What about using mesh instead of applying a rotation matrix for object types that support mesh? I think I might write my own addon since I only need this for text and sprite and both can just use a 2x2 mesh

skymen commented 2 weeks ago

I made a new behavior for testing my solution to this https://www.construct.net/en/make-games/addons/1273/mesh-rotate