How do I ... transfer drag speed to a bullet

0 favourites
  • 2 posts
From the Asset Store
This pack contains 10 types of bullet effects, with different shapes and colors.
  • I have a touch game. There are two objects (object1, object2) that a player can drag around on the screen. They can be moved at the same time. The player touches either or both objects and drags them around. (I'm using the touch area and then binding the object to a touch area method for this).

    When either object collides with a bullet, there is a collision.

    I want to the speed that the object is being dragged to transfer to the bullet. If object1 is being moved slowly, when the bullet collides with it, the bullet should bounce off slowly.

    I can't figure out how to get the speed of object1 or object2. I've tried adding a bullet behavior to them. I've thought about calculating speed every 200 milliseconds using the distance but that seems cumbersome and unreliable.

    Does anyone know how to get the speed or acceleration of a drag/drop object?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You will probably find you will need to calculate it yourself using the speed=distance/time formula and transfer that to a variable to set bullet speed by.

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