Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business


OverviewFelgo 3 Support (Qt 5) › Modifying the Car Challenge control to a like 2D action RPG control

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


    Hi, I’m searching since some days ago a way to modify the control of the Car Challenge demo.

    By default, when press to left or right the cars rotate, and I want to change that behavior to a like action RPG control like Zelda: A link to the past or Soleil.

    I just want when I press to left, the cars move to left, when I press to right, the cars move to right, instead of the default rotation behavior. And obviously, when I press down, the cars move to the bottom of the area or the window.

    I doesn’t mind if the cars don’t rotate automatically after doing the changes.


    Felgo Team


    there are numerous ways for creating such movement, the CarChallange demos using physics and the keys are modifying the physical properties force and torque of the car collider.

    force: Qt.point(twoAxisController.yAxis*8000, 0)
    torque: twoAxisController.xAxis*2000

    You could remove the torque and instead do something like this on the force:

    force: Qt.point(twoAxisController.xAxis*6000, twoAxisController.yAxis*6000)

    Now the car won’t rotate but only move in x and y direction.

    You could also e.g. use a MovementAnimation to move the character constantly if a key was pressed.


    • This reply was modified 8 years, 8 months ago by  Alex.


    Thank you very much. Putting a negative value to y Axis I get the thing I want.

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

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded