How do I rotate my cards in 3D shape (flip card)?

Not favoritedFavorited Favorited 0 favourites
  • 12 posts
From the Asset Store
Template for a basketball game with a 3D aspect (illusion of 3D)
  • Hello everyone, I'm trying to move a 3d shape on the Z axis, with tween, but I can't... is there any calculation or way to move 3d objects on the z axis too?

    like this example : https://www.dropbox.com/scl/fi/o65y9e62zd2wmqko554ic/3d_card_flip.c3p?rlkey=4r7po5ketlw9m5xlagjocb4pj&e=1

  • That example sets the zelevation so that probably overwrites a zelevation tween. So you could probably tween a value and add it the action that sets the zelevation.

  • Hey! In Construct 3, since it's a 2D engine, simulating Z-axis movement usually means faking depth using scale, position, or layering.

    For a tween on the Z axis (like in your card flip example), you can try adjusting the object's scale and Y position at the same time to create the illusion of moving forward or backward in 3D space. For example:

    As Z increases (moving “closer”), increase the scale and slightly lower the Y position.

    As Z decreases (moving “farther”), reduce scale and raise the Y.

    You can store a Z variable and tween that manually, then update the scale/Y every tick based on that value.

    Let me know if you want help with the expressions!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • you can try adjusting the object's scale and Y position at the same time to create the illusion of moving forward or backward in 3D space.

    But this won't actually flip the card, right? I.e. the back face of the card object will not appear at the top?

  • Since I made the example linked in the original post here it is tweaked to allow for tweening:

    dropbox.com/scl/fi/s234ich05y6bkli6uw6ws/card_flip3.c3p

    Hey! In Construct 3, since it's a 2D engine, simulating Z-axis movement usually means faking depth using scale, position, or layering.

    While it's true construct is primarily a 2d engine it indeed has real depth and a depth buffer if you want to utilize it. The original example and the updated example take advantage of it.

  • I'm grateful to everyone for the help :)

    However, is it possible to create a 3D shape and rotate a card the same way as in the example above?

  • I can never recall the name of the plugins.

    If you mean the 3d shape object that comes with construct then no, it only lets you rotate around the z axis.

    If you branch out to third party plugins such and “3d object” or third party behaviors such as “3d rotate” then you can rotate around more axis’ fairly easily.

    I haven’t really used them though since I’m more interested in exercising my mind to be more familiar with the math involved.

  • Is there any way to rotate 3D shapes on the X, Y, and Z axes without using the plugin below?

    https://kindeyegames.itch.io/construct-3-rotate-3d-behavior

    My concern is about V1 features being deprecated.

  • Nope. The only vanilla plug-in way to do it is with mesh distort with some math. Beyond that you have to use 3rd party plugins. Reach out to the devs of the plugins on discord. They may very well be able to port it to v2 or the sdk.

  • According to them, V2 is not supported...

    Is that true, Ashley?

  • Addons which hack new features in to the engine are an absolute compatibility catastrophe and regularly cause disasters, and it looks like the addon in question does that. The SDK v2 is probably capable of making a plugin that produces a 3D shape that is rotatable in 3 dimensions, providing the plugin implements those features itself rather than hacking in to the rest of the engine - which is a far better design and the one that really should have been used in the first place.

  • Addons which hack new features in to the engine are an absolute compatibility catastrophe and regularly cause disasters, and it looks like the addon in question does that. The SDK v2 is probably capable of making a plugin that produces a 3D shape that is rotatable in 3 dimensions, providing the plugin implements those features itself rather than hacking in to the rest of the engine - which is a far better design and the one that really should have been used in the first place.

    without using a v2 plugin, is it not possible to do this in c3?

Jump to:
Active Users
There are 0 visitors browsing this topic (0 users and 0 guests)