Forums

OverviewV-Play 2 Support (Qt 5)Modifying the Car Challenge control to a like 2D action RPG control › Reply To: Modifying the Car Challenge control to a like 2D action RPG control

OverviewV-Play 2 Support (Qt 5)Modifying the Car Challenge control to a like 2D action RPG control › Reply To: Modifying the Car Challenge control to a like 2D action RPG control
#9750

Alex
V-Play Team

Hi,

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.

Cheers,
Alex

  • This reply was modified 3 years ago by  Alex.

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