OverviewV-Play 1 SupportBoxCollider › Reply To: BoxCollider

OverviewV-Play 1 SupportBoxCollider › Reply To: BoxCollider

V-Play Team

Hi kitKat,

this is not that trivial as far as i know, but I think i can show you everything you need to solve your problem.

First you will need to find out the direction of the collision, this information is stored in the “contactNormal” vector which is available within the “fixture.onBeginContact:” signal. You can find a code sample in Ball.qml of the VPong demo game.

If you know from which side the entity is approaching the target, you can compare the x and y values to find out the “length” of the collision.

Let me know if this helped you. Also if you produce some nice code that could help other developers, feel free to post it here 😀


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
create apps
create games
cross platform
native performance
3rd party services
game network
level editor
easiest to learn
biggest time saving
best support