Tag Info

New answers tagged

0

I tested your script and it works as expected. The problem is most likely the animation itself. You should enable autoplay from the Animation component and see if your animation works without the script. Also make sure there are no errors in the console. Click the error counter in case you have accidentally hidden them.


0

If you're accumulating the amount of time that has passed since the dialog box appeared in a variable, then you can divide that by the total length of time you want it to take for all the text to appear. That will give you the percentage of the string should have appeared by now. Multiply that with the string length and round down to find out actually how ...


1

You can use Blend Trees to change animation speed. First of all you should add float parameter to Character Controller. Then create Blend Tree and double click on it. It'll open Blend Tree editor. Select Blend Type 1D and select created float parameter. Add 5 same animations of reloading. Each animation in Blend Tree has two parameters: Threshold and Speed. ...


0

The easiest way to accomplish what you're asking is to split the objects up into different parts and animate them separately. From there you can either use a bone and joint system (similar to what Flash developers do) or, as you said, each part has its own animations.


1

I finally figured it out. After selecting the animation transition you can see in the inspector a section with some bars. This shows how long the transition between the two animations will take. You can slide the bar over so that it shows 50%, telling you that the transition will be instant. Or is it? Select the dropdown next to the padlock at the top ...


0

You can use Path2d to define the outer edge of your rounded rectangle. This actually creates a Shape. To turn this into something you can use, FlatteningPathIterator can be called to create a list of points that can be used to step along the path. You can use this information to draw your circle as it progresses around your progress bar. Here is a good ...


0

You might just try hiding whatever it is until the frame where it's in position. Otherwise, it sounds like you want a Broken animation curve. See also: Unity Manual: Editing Curves


1

MD2 files are just mesh frame arrays. There is no skeleton. Actions are just mesh frame sequences in the array. You can copy the character's md2 file for each weapon. Carefully replace the character mesh with a positioned weapon mesh for each action sequence frame. While labor intensive, this approach allows you to give the weapon movement much more ...


0

You can play an animation and : animation->setDelayPerUnit(T);


1

this is easy way to create animations, you can add all animation images to one image and than use them separately , for example each image is 20x20 pixel and your animation contains 3 images so the big image will be 60x20 , and if you split it by 20 x20 pixel you can get all the images , and then put those images in animation . Another example. your ...


2

From the documentation: public TextureRegion[][] split(int tileWidth, int tileHeight) Helper function to create tiles out of this TextureRegion starting from the top left corner going to the right and ending at the bottom right corner. Only complete tiles will be returned so if the region's width or height are ...


0

I think you are over thinking this. Just have each object has its own update method that takes a delta time; then do obj.vy += 0.01 * dt; //gravity obj.y += obj.vy * dt; And call this for every object in each game step and your done!


1

It's primarily a technical issue that most companies won't use pure vector art in their games. I know many artists who make their creations in Flash or Illustrator, only to pump out a rasterized image that gets slapped on a polygon sprite. It's just a technical hurdle that most large companies aren't too keen on trying to figure out. Below is an example ...


0

From your code : if (keydown.right) { if (player.frame != 4) player.frame = 4; else player.frame = 8; player.direction = 'E'; player.x += 3; player.color = "blue"; } I can tell that the images are switched every update as long as the key is down. There are all kinds of ways you ...


1

What are some best practices to determine the total texture budget of a modern 2d game? This likely depends on the size of your target platforms RAM/VRAM, and how much you'll need to have loaded at one time. It's probably something that you have to fine-tune. Another thing to consider is non-volatile storage (media/disk space, etc.). How can I tell ...



Top 50 recent answers are included