Tag Info

Hot answers tagged

4

Alpha mask texture approach In case your circle would always be the same size, using a second alpha mask texture would be the way to go. You would make it a grayscale mask texture and use its value as the alpha value while drawing. Using a texture had the benefit of having anti-aliasing built into the mask (ie. at the borders of your circle, the pixels can ...


4

The artifacts are caused by scaling the images using point sampling / nearest neighbourhood filtering, which effetively doubles some of the pixels from the original image. To get better results, switch to bilinear filtering which uses weighed average of multiple pixels. The result will be a little blurry, but should look a lot better than the current one. ...


2

You have to return true from touchDown. Documentation says: The GestureListener can signal whether it consumed the event or wants it to be passed on to the next InputProcessor by returning either true or false respectively from its methods. So, if you return false from touchDown, that is the first even raised in all cases, it stops event handling. If ...


1

//At the apex of the jump, Ruben's velocity.y is ~0 if (Math.abs(ruben.velocity.y) < 1) //If Ruben's velocity.y gets close to 0... { ruben.velocity.y = 0; //stop him Ruben.setState(Ruben.RUBEN_STATE_IDLE); } //velocity.y = +1 //jumping //velocity.y = 0 //no more jump left; begin falling (except the if activates) //velocity.y = -1 //falling Edit - ...


1

In Bob's update method you do nothing with his velocity. He has no way of actually moving, with the code you have shown. You should do something along the lines of this before you reset the bounds: position.add(velocity.x * deltaTime, velocity.y * deltaTime);


1

The most likely problem is that in one of your actor's draw calls you are forgetting to reset the batch's color. This would cause alpha transparency to carry throughout your entire stage. Make sure you always reset the batch's color at the end of a draw call where you manipulate it. Here is an example: public void draw (Batch batch, float parentAlpha) { ...



Only top voted, non community-wiki answers of a minimum length are eligible