This code, from the clumsy bird example, moves the world center at the same speed that the bird moves:
B4X:
Public Sub Tick (GS As X2GameStep)
Dim center As B2Vec2 = X2.ScreenAABB.Center
center.X = center.X + X2.TimeStepMs / 1000 * BirdXVelocity
X2.UpdateWorldCenter(center)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.