Forums

OverviewV-Play 1 Support › Rotation around x or y axis not working?

Tagged: 

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #4735

    Mathias

    Hi,

    I’m currently porting a game made in QML for Meego to V-Play. Most things works fine but I have some issues with the “card flip”-animations that were implemented using  Rotation element around y axis. I made a small test application to test the Rotation element and it seems to work fine to rotate an object around z axis, but not around x or y.

    Here is my code:

    import VPlay 1.0
    import QtQuick 1.1
    
    GameWindow {
        activeScene: scene
        width: 640
        height: 960
        
        Scene {
            id: scene
            width: 320
            height: 480
            
            Rectangle {
                anchors.fill: parent
                color: "black"
            }
    
            Rectangle{
                id: rectangle
                width: 100
                height: 100
                color: "red"
                anchors.centerIn: parent
                transform:  Rotation {
                    id: rotation
                    origin.x: rectangle.width/2
                    origin.y: rectangle.height/2
                    axis.x: 0; axis.y: 1; axis.z: 0     // set axis.y to 1 to rotate around y-axis
                    angle: 45    // the default angle
                }
            }
    
        }
    }

    Will this be fixed anytime soon?

    Thank you!

    – Mathias

    #4736

    Christian
    V-Play Team

    Hi Matthias,

    I’m sorry, but with our current renderer flipping is not possible. You could create the animation in any program and save the single sprite frames into a sprite sheet, and then play the animation sequence like an animated gif. Would this be sufficient for your use-case? Another workaround would be to animate the xScale of the sprite from 1 to 0, then change the sprite image, and then animate the xScale from 0 to 1.

    Cheers, Chris

    #4737

    Mathias

    In my case using sprites would not be practical. Animating the width will work fine in my case even if the effect is not as nice as the QML flip rotation. Thanx for the input.

Viewing 3 posts - 1 through 3 (of 3 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support