Sunday, September 4, 2022
HomeGame DevelopmentBezierTo doesn't transfer at fixed velocity - cocos2d-x

BezierTo doesn’t transfer at fixed velocity – cocos2d-x


Utilizing BezierTo on a Sprite I word that it strikes at totally different speeds at totally different locations on the curve. Any options for this?

I’ve a path made up of curves, for every curve I calculate the size after which use that size to calculate the time. Nonetheless it’s on a person curve outlined in BezierTo that the sprite slows down and hastens.

I’ve demoed this within the video beneath setting the curve as a straight line. You do that by setting management level 1 to the tip and management level 2 to the start with a time of two seconds. The sprite will get slower the nearer to the center it will get till nearly stops. Settings the factors to be equally distanced alongside the road solves this for Bezier straight traces, however I’m not utilizing Bezier curves for traces, this identical behaviour is exhibited on curves and that is problematic.

Instance of not fixed velocity on a curve. A bit exhausting to see however the sprite picks up a little bit of velocity when hitting the curve within the centre of the display.


RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments