Rotating around the center.

Is it possible to set a center on a card created by a CardMaker? It now positions and rotates the card from the top left corner, I would like to change that so that the position and rotation is relative to the card’s middle.

DECK = CardMaker('Quad')#to generate the quad with

This code creates a 1x1 quad with the center in the center.

Basically make a dummy NodePath and parent it to whatever NodePath you have the card parented to.

like this:

myDummyNP = NodePath(“myDummyNodePath”)
#not sure if this number is right, but basically you offset from the center

That should do it.

Thanks guys. However, both these solutions seem more like workarounds. Extra nodes and having to create the card using a specific frame using 0, 0, 0 as the center, always.

There has got to be a way to say “set center in the middle of these vertices” as you can when you create models in some 3D authoring software.

See for example code of a working solution.