0

Currently, I am doing this

@Override
public EngineOptions onCreateEngineOptions() {
mCamera = new BoundCamera(0, 0, CAMERA_WIDTH, CAMERA_HEIGHT);
EngineOptions engineOptions = new EngineOptions(true, ScreenOrientation.LANDSCAPE_FIXED,
new RatioResolutionPolicy(CAMERA_WIDTH, CAMERA_HEIGHT), mCamera);
mCamera.setBoundsEnabled(true);
return engineOptions;
}

But Still,in Landscape mode it went beyond screen from right side. How can restrict a sprite to leave screen?

Kona Ahmed
  • 65
  • 2
  • 8

1 Answers1

0

A really shitty way of doing it is to add an invisible physics bidy so it cannot pass. Or in the sprite and override onManaged update that will allow you to check collisions

rush2sk8
  • 362
  • 6
  • 16