- Home /
Need a little advice on the logic behind animators and offsets.
Going to try and explain this as thoroughly as I can because if it's confusing to me I can't imagine what it's like on the other side.
So I had an animator that controller my aiming and sprinting before that looked like this http://puu.sh/l3ouG/5cda7d28b0.png [1]
Everything worked fine and dandy when I finally lined it all up correctly. I then added in another animator on the same object for switching weapons which looked like this http://puu.sh/l3oxq/9df237a006.png [2]
Note that this is the second layer and I put the aiming/sprinting on the base layer. I'm not sure if that itself is the right logic for how it would function, but I'm working towards that. Now originally I had the object that the first animator was attached to on the Player > First person character > Gun camera (so the gun wouldn't appear to go through the walls) > UMP-45 (which is where the animator is)
Now after I implemented the gun switching part the layers went Player > first person character > gun camera > Hand (where the children are the inactive guns).
So it's on the same level as the original gun. Here is a picture to make it all clearer if it's not http://puu.sh/l3oMk/fdfc1d59aa.png [3]
The problem I have now is, when I start the level the gun is no longer in the bottom right where it should be, it's up in the top left at a weird rotation, but in the preview before I hit play, it's in the right spot. I know I could easily just go to the children and offset them so when I spawn it goes to the right spot, but that seems like the incorrect way to fix it. I'd rather the preview show where it will be and it be there, instead of it being off the screen somewhere in the preview and then correct on screen. I checked my WeaponIdle animation and it has no weird skews to cause it to go up there, so I don't know why implementing the layer on the mask would cause it to do that, when they both worked separately before that (i believe).
So...really long question for a potentially really quick answer.
Your answer
Follow this Question
Related Questions
SetIKPosition offset 1 Answer
Unable to set IK position with an offset, it keeps jittering. 0 Answers
2D Animation does not start 1 Answer
Animator position offset 0 Answers
Attach a gravity automatically? 1 Answer