Tag Info

Hot answers tagged

2

In the second case it is not drawing because the constructor with no arguments doesn't set a width and height for the image, however the constructor that takes the drawable obtains the values from it. To fix in your case: Texture texture = new Texture(Gdx.files.internal("cookie.png")); Image itemImage = new Image(); itemImage.setPosition(10, 10); ...


2

You can use pendulum physic to approximate your rope swing. Calculate the fluctuation period (this is true for small fluctuations) T = 2*PI*SQRT(L/g) where: PI = 3.14 g = 9.8 (if I remember) the earth gravity acceleration L : the rope length, or better the length from rotation fulcrum to the character hands. Then you get the fluctuation angle as ...



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