Quantcast
Channel: Pixi.js Latest Topics
Viewing all articles
Browse latest Browse all 3978

How to get velocity from a tween

$
0
0

Hi,

My challenge: I have a platformer in which I have platforms moving based on tweens.

When the player lands on a platform, I want to add the velocity of the platform to that of the player, so that the player can move independently, but still be affected by the platform beneath her.

The problem is, tweens don't have a velocity property (e.g. vx, vy). They move objects by updating the x and y positions directly.

Any help towards the right general approach would be appreciated.

Thank you!

 


Viewing all articles
Browse latest Browse all 3978

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>