# Tag Info

4

I'm using Hooke's Law here as the definition of a spring. () Given the derivatives of position and velocity, are velocity and force respectively, we can construct a differential equation for the stretching of the spring. Which is just a damped harmonic oscillator, and since we already know that only the under-damped case need analysis, we can obtain a ...

3

It looks like it's supposed to represent a motion blur or at least achieve a similar effect: to convey the feeling of movement and speed as the sword is swung in a arc. In 3D we sometimes go for similar effects with geometry or particle-effect based "trails" behind slashes. It looks the way it does for a variety of reasons, many of them due to the ...

3

If you call coroutines this way they will be executed in order, one after another. You should fire them up with StartCoroutine(Aiming()); public IEnumerator Aiming() { yield return StartCoroutine(LoadBow()); yield return StartCoroutine(DrawBow()); aimStates = AimStates.Aim; } ...

2

You will have to manually add all the frames for your animation. You don't need tweening unless you want to rotate or move the sprite from point A to B and have it automagically interpolate (be)'tween the key frames. For walking, jumping, shooting animations, etc. You have to do it manually. There's no magic for that. Here is a little guide to help you ...

1

You could disable the gravity on the Rigidbody and then just make gravity yourself by writing a script and using GetComponent<Rigidbody>().AddForce(-Vector3.up * Time.deltaTime * YOUR GRAVITY VALUE) and just change YOUR GRAVITY VALUE when ever you want the object to be slowed down.

1

I found this tutorial on the OpenGL wiki a month ago. It explains the basics of skeletal animations; but I hope it is good enough for what you are trying to do, if not, you can also search skeletal animation opengl on google, because there is much more on the opengl wiki about this topic.

1

You currently have a typo in the line you posted: this.canvascanvas.Height should be: this.canvas.canvasHeight Alternatively, you can use canvas.width and canvas.height as shown in this StackOverflow answer. Debugging tip When this type of code snippets don't work, try just outputting their values to the console with console.log(...). In your case, ...

1

If anyone could offer any ideas as to 'force' the game to complete the animation first before continuing I would be really greatful. It looks like you haven't implemented any way to tell if the animation is complete. You are using a shooting flag that appears to be a bit confused about it's purpose. The shooting flag gets set when the user clicks the ...

1

In your Animator Component, change Update Mode to Unscaled Time. Now the Animator can play even when TimeScale is 0. Useful for pause menus and similar. Docs

1

Ah yeah. Fire Emblem, a great game indeed. If you take a really close look to the critic attack of Lyn you will actually got it. The first slash is going from down-right to up-left. That will be the first slashing image starting from the left of the sheet combined with the second. So, we can say that the second slashing image is a continuation of the first ...

1

The solution suggested by Sebastian would work, but you'll end up with a lot of code just for a "fade out/fade in" animation. Libgdx has built-in functionnalities for that in Scene2D, you should use them. (Actions, Stage, Actor) That would make your code as simple as that : myPlayer.addAction(Actions.sequence(Actions.fadeOut(0.15f), ...

1

Why not set the alpha value of the sprites directly via sprite.setAlpha(float)? Of course you would have to call that by your rendering method and calculate the amount of alpha alteration using deltaTime. https://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/g2d/Sprite.html#setAlpha-float-

1

The trajectory of the particles is a Bézier curve. A Bézier curve is a smooth curve along four points: pointA: startpoint pointB: startdirection+acceleration pointC: enddirection+accelleration pointD: endpoint Basically it generates a curve through from point A to point D, using the vectors towards A-B and C-D to determine the path. See C# (Monogame) ...

1

As the comment says offset only effects the children, i.e the text inside the button. What you need to look at is this piece of code: buttonStyle.up = new TextureRegionDrawable(settingsAtlas.findRegion("achievements")); buttonStyle.down = new TextureRegionDrawable(settingsAtlas.findRegion("achievements")); Since you set the same image for up and down you ...

1

It's unfortunate that I have to answer my own question, but I'll post the fix that I worked out in case it helps someone else. int current_image = 0; int current_image_add = 1; These two variables inside of the animate() function were being reset every time animation() was called, meaning that it never really cycled through anything because it continued ...

1

You could set a boolean for example to false before yield and then after the time had passed set it back to true and then just use if statement to check if the boolean is true/false. What about efficiency, I think there's not much of a difference. From what I understand the delay from coroutine affects only something you change before and after the delay so ...

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