Skew DirectFrame vertically

Hello everyone, it’s me again hehe.
Now i want to know if there is a way to Skew a DirectDraw vertically, such as this image:

Can someone help me? :sweat_smile:

Forgive me if I’m being silly, but I’m not sure of what a “DirectDraw” is in this context. ^^;

That said, if you have a NodePath, you might be able to set its “shear” value, like so:

myNodePath.setShear(xShear, yShear, zShear)

Otherwise, it looks like you can create a matrix that contains a shear-transformation, like so I think:

myShearMatrix = Mat3.shearMat(xShear, yShear, zShear)

(I’m not sure of whether a 3-matrix is the correct choice there (as opposed to, say, a 4-matrix). You may want to check that if you use this method!)

This matrix could then be applied to whatever you want to apply it to, as applicable.

1 Like

Sorry, i mean DirectFrame :sweat_smile:
the shear works, but only horizontally, but i workarround by change the hpr to -90 on the elements inside this frame. Thanks again :grin:

1 Like