Tag Info

New answers tagged

0

I have now posted a thread on Unity support forums and followed up on Issues tracker with an issue that pretty much has the same content as my question. Unity Issues Tracker has closed the issue saying that this behaviour by design. That seems to make some sense. However, I am still puzzled by this because we don't know (I don't know) exactly what the ...


0

You can use normalised time to jump to a particular frame. Animator.Play(state, layer, normalizedTime); The range of normlaized time is 0 to 1. For example if your total animation has a rotation of 360 and you rotate the object manually to 180 and want the animation to be played from middle frame. Then you need to give normalised time as 0.5 (i.e. ...


1

Reverted to UnityEngine.Animation. Works like a charm and has no performance hits.


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.


0

Just to clarify, applying gravity to a specific rigidbody will not effect everything in the scene. If it does, then you have a larger issue about to come. Calling a reference to the rigidbody attactched to an object and adding gravity * Time.deltaTime will increase gravity until the player touches back down. At that point I would decide a max gravity value ...


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 can use Mecanim "Triggers" to start the Shoot animation state. The trigger will reset itself to false in the next frame, so the shoot animation will play only once. Then from shoot animation make transition back to idle pointing gun state and the condition should be exit time. Example :-


0

You can use Input functions to detect these actions. Following code shows how you can achieve it and I have commented the events when they are true. void Update() { if (Input.GetMouseButtonDown (0)) { //Touch Begin - True when the finger touches the screen //Play animation for chicken squat } else if(Input.GetMouseButton ...


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 ...


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 ...


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 ...


0

For anyone else in this dilemma, I would recommend these links to you: https://www.codeandweb.com/texturepacker/tutorials?km_user-type=developer https://www.codeandweb.com/texturepacker/download


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

Use Time.timeScale = 0 to stop everything.


0

I noticed that you created a coroutine but never called it, by using StartCoroutine().


0


0

It's a fairly simple fix...just had to add animation speed & it worked.


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-



Top 50 recent answers are included