New answers tagged

0

The LeaderboardsClient.loadCurrentPlayerLeaderboardScore method returns a LeaderBoardScore that you can use to query the rank of the current player.


0

The first five lines are indicating where you have errors. Looking at the first one: C:\Users\MCreatorWorkspaces\tree\src\main\java\net\mcreator\tree\item\ObsidianAxeItem.java:43: error: illegal start of expression new ItemStack(, (int)(1)) ^ This tell us that the code file ObsidianAxeItem.java has ...


0

It definitely is possible, but Java isn't the best language to use for scripting, as a language it was designed with the goal of actually being used to write the core application itself, not for the scripting in the application.


0

After using glGetUniformLocation() to set the shader properties I discovered the shader location values were not being defined due to an error in my shader constructor. Once I rectified that error my quad was drawn to the screen. Thanks for all the help and input!


0

use the Stage class to render ui things private Stage stage; @override public void show() { ... stage = new Stage(); // create the button final ImageButton shuffleButton = new ImageButton(/*maybe need some params*/); shuffleButton.addListener(new ClickListener() { @Override public boolean touchDown(InputEvent event, float x, ...


1

glVertexAttribPointer sources data from the currently bound GL_ARRAY_BUFFER. What this means is that if you're drawing using 3 buffers, you must ensure that the correct buffer is bound for each glVertexAttribPointer call. So instead of: // Gen and fill vertex buffer (VBO) quadVBO[0] = glGenBuffers(); glBindBuffer(GL_ARRAY_BUFFER, quadVBO[0]); ...


0

I found that ModelBatch.begin(...) will disable Blending by calling Gdx.gl.glDisable(GL20.GL_BLEND). So make sure to enable blending AFTER calling ModelBatch.begin(). modelBatch.begin(camera); // resets Blending to false // enable Blending Gdx.gl.glEnable(GL20.GL_BLEND); Gdx.gl.glBlendFunc(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA); // draw mesh mesh....


0

To make the camera be centered on the player, but also not pan beyond the bounds of the map you simply need to clamp the camera position in such a way that is never is more than half the visible distance from an edge. So for example Vector2 playerPos = /* you set this somehow */ float mapWidth = /* this should be the width of your map in world space */ float ...


1

Two obvious problems here: You've labelled a variable degree that's actually measured in radians, not in degrees. You're telling the object how much to rotate by, not giving it a target angle it should rotate to. These can both be solved by reading the documentation for the methods you're using. It tends to show when you don't. 😉 float radians = (float)...


0

Try this: elapsedTime (current Java time always) over cooldownEndTime (predicted 1000ms in future) multiplied by maximum bar height 0.06f; That is scale.y = (elapsedTime/cooldownEndTime)*0.06f; giving you a fraction scaled by a bar height. Additionally *- dividing elapsed time by 1000 or any fixed number is always going to give an unusual result, since ...


Top 50 recent answers are included