ı have created a race game and the camera follow the car with code below.Besides there is a sprite in scene which is in (100px,100px) as button.the problem is: When camera moves, the button never move.The button must always show on screen.But it don't move.What can I do?
mCamera.setChaseEntity(sprite);
Use HUD. It is a special Scene that does not move when the Camera moves and it was created for exactly this purpose. The basic usage looks something like this:
private HUD mHUD;
mHUD = new HUD();
camera.setHUD(mHUD);
mHUD.attachChild(button);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With