# Tag Info

0

I think my unity got bugged or something,so I created a new animation and named it different,but its the same one.And it works.God knows what went wrong but Im glad it's fixed now.Thanks everyone for trying to help and taking your time to read this. ~Ssiro.

0

Your approach is inverse of what I would do. Weapons don't control the character, it's the other way around. So I suggest setup animations on character to jump normally as it has a weapon in hand. If you have several weapon types (light, heavy, custom...) you can setup animation for each one of them, it would probably just affect how hands are holding the ...

1

I've been puzzling with this in the creation of my physics based game. I've decided to settle with creating my animations used a skeletal key-frame based animations system (Similar to flash if you've used it). I will then create physics bodies for each 'limb' of my character. Each of these limbs will have forces applied (depending on the distance from the ...

3

Inverse kinematics. That is the word I think you are looking for (easily googlable). As for libraries, I do not think so. It is very rare technique - the only game I can think of using inverse kinematics is Kingdom Come: Deliverance.

1

Mmmm, interesting question. The first approximation could be the following: simply divide your character into a set of physical bodies. I mean, you could calculate resultant force on legs, feet, arms and hands and operate with the results. Think in Rayman, for example. It can be a good model to start with. The character would be formed by head, body, hands ...

0

I suppose what you mean by "change its sprite" is to change its texture. If so, have you tried something similar to this? // Inside a co-routine after you have started playing the animation "my_sprite_anim"... float previousTime = 0; while (animation.IsPlaying("my_sprite_anim")) { // A value of 1 is the end of the animation. A value of 0.5 is the middle ...

0

0

First, keep in mind that the order in which you apply the transformations is important. This is because matrix multiplication is not transitive: A*B != B*A I'm guessing your intent is to scale the rectangle first, then translate it to the right position. If you do it the other way around the distance translated will be scaled as well, which is probably not ...

1

This formula updates value so a constant fraction of the difference from the value and the target is removed each frame. Let alpha = 1/(someFactor+1). Then we can rewrite updating to the new value' as: value' = (1-alpha) * value + alpha * target Then basic algebra says value' - target = (1-alpha) * value + alpha * target - target value' - target = ...

0

I'm assuming that you're incrementing someFactor every frame, yes? someFactor += 0.1f; Why not try incrementing it based on dt? someFactor += 0.1f * dt; This concept is reified in Jason Gregory's Game Engine Architecture under Section 7.4. if you're interested in reading into it further.

0

I would suspect there is a way to setup the normals within your animation tool so that you don't have to mess with them in Unity, but it turns out there's a simple setting when you import the model. Go to the Inspector and look in the Model tab, and set the Normals property to Calculate (it defaults to Import). (There is also a code command to calculate ...

0

What I would likely do is convert the rectangle to a Pixmap, then, assuming the rectangle has a solid single color border (with a different color than the rest of the rectangle), I would simply iterate through the pixels in the Pixmap looking for the border color and save all the positions to an array. Then all you would have to do is periodically set the ...

1

I figured out how to fix this, but I'm still not entirely positive what the actual problem was. My rotation was very simple and was only in the X axis. The Y and Z axis remained at 0 throughout the rotation. However, if I manually type 0 into these boxes (even though they are already 0) the weird rotation problem goes away. This is repeatable. If I ...

3

Use floating point variables for entities' velocity and position. Use integers only when translating from world position to screen position. This way, your ship will move smoothly thorugh tiles. Also, add a Camera object to convert your world coordinates to screen coordinates as soon as possible.

0

Unity animations do not animate changes to mesh details. Animations are only pos-rot-scale of nodes. Unity's skinned mesh renderer uses animations of nodes to deform meshes. How Unity deforms your mesh can be slightly different than Blender's deformation. Unity is trying to do the right thing given the armature animation and the mesh weights for the nodes of ...

0

Box2D is a physics library for 2d environments. Tweening is the process of gradually interpolating values. Tweening itself is not fundamentally for animation, though it is widely used in animation for smooth transitions.

0

If you're looking for a really simplistic approach, here's one I've used in the past: Create an object that has both sub-objects (rectangle and circle) Create a getter/setter pair for x/y coordinates on your object When you move the object by calling setX(x), it sets the rectangle's x coordinate to x, and the circle's x coordinate to x + a where a is the ...

0

assuming by sprite you mean that it is an image (loaded from a bitmap): i would iterate through the pixels in the image, and identify the ones on the edge (adjacent to a transparent pixel) (or load an identical black and white hollow rectangle image showing only the edge points for easier identification) log those Points into an array by starting at one ...

-1

Are your keyframes in all 3 rotation channels? Try Ctrl+N in edit mode for the bones. Good luck. EDIT: are your rotations set to global or local? when you press i to enter a keyframe are you selecting locRot or Rotation? Whichever one you are using, try the other one.

3

I assume you will be using some modern rendering API to draw to the screen, such as OpenGL or D3D. You will certainly want to batch sprites as much as possible and use sprite sheets to reduce the number of textures. A sprite sheet is nothing more than a Texture Atlas (also read this). Once you have a Texture Atlas up and running, it will be up to you how you ...

1

I found a solution which works for my purposes since I don't use many bitmaps on the canvas. It's absolutely fluent when I invalidate() just once when all bitmaps (background and so on) have been loaded and then in onAnimationUpdate() I only partially invalidate the canvas by this method: invalidate(int l, int t, int r, int b); That means I only ...

1

Well since you spaghetti so kindly, I personally use an enumeration for which animation state the character is in. The states I use for a 2D platformer are simply RUN, IDLE, JUMP_RISE, and JUMP_FALL. Each animation state corresponds with a set of 8 sprites, which are loaded to my camera function, which changes what the player looks like on screen. Are you ...

1

When you want to draw something fast on the Android GUI don't use the View.onDraw() method. It is too slow. Generally everything is done one the main(gui)-Thread, including each onDraw() of each View. And the time of the calls to each .onDraw depend on everything else on the main thread. To be fast you want to draw onto a canvas on a separate thread (with ...

0

With new animation system, animations are handled by AnimatorController component. If your animation start automatically, it means that the clip is the default one (orange color) in the controller graph. To prevent this on Behavior on start you have 2 way: Keep AnimatorController component disabled until you don't need it. Use an empty state with no clip ...

0

It seems that the title went from Animation to Animator which seems to indicate that you might need to look at a different menu. I found this in the unity manual. Perhaps look for an Animation menu.

Top 50 recent answers are included