Any simple way to have upperbody rotation totally seperate from lowerbody movement? (Mechs)

Howdy,

If i were to do a mech, where you can rotate the upperbody and shoot in one way while walking in another, what's the quickest way to get that setup? I feel like it's something i've done or should be able to do here but i'm not certain. something with the ik?

Similar question to like, a tank and tank turret. how to rotate the turret while keeping the tank pointed a dif direction. This stuff might need a custom movmenet locomotion preset, and if so is there anything i need to know about using the ucc in such a way?

Much appreciated!
 
Your character's animator and animations should allow the top and bottom halves of the rig to move separately, i.e. in response to different parameters. I'm not 100% sure how you'd need to set up the IK, but I imagine you'd want the Look At Body Weight to be high. I don't see any reason why you couldn't use a normal third-person movement type (e.g. Third Person Adventure) to produce this kind of result - as long as the character's look source is being rotated properly with your animator and IK.
 
I'm ideally not using an animator for the rotation. the legs may be stepping but the top would ideally jsut be a slerping/rotating pivot, the top half needs to just follow the mouse with code. when it shoots, sure the guns will animate, but i don't think i'd have any top animation. i got the raw functionality to mostly work via fucking with ik and disabling LookAt in the weapon item usage, however i have no idea how i'd do this with a non humanoid model as generics don't use the internal ik system.

Which i guess sums up the thing. I need the character to move with tank controls while defining which part of the model rotates to follow the mouse and not have htat upperbody rotations interfere with the base movment. and since not every bot is humanoid, getting this to work with generics would be ideal.
 
I suppose you could add a separate gameobject as a child of the player object, and have it use a custom component which reads the main player object's input to rotate itself manually. You'd then need to do a few extra things e.g. having ShootableWeapon items use this top half object as their firing source, etc.
 
That makes sense, i'm never quite sure how much i need to expand on the ucc or how many features i'm just missing when it comes to this stuff. that seems like the wya i'd do it normally and just building it ontop of character with that input reading makes sense. Didn't know if i was missing something but i guess not. Thank you!
 
Howdy agian, sorry i know i marked this done but i realize i wasn't sure exactly what i was trying to ask and have a much clearer way to phrase the question.

Here's a quick vid of what i'm after, first with a game, then with another unity toolkit, then with what the ucc does in it's adv and combat modes.



All i really want is to be able to have the upperbody follow my aim and the lowerbody not when i'm stationary, and have character move in the direction of my aiming when i do move and have "walk backwards" behavior anims when backing up..

Adventure lets me rotate my upper (via ik) and not move legs this way but has no "backing up", and combat auotmatically rotates the entire character with the view but has the backup movement i want. Is there a way to get this behavior out of the box, or is this a situation where i write a custom movement type that combiens those two behaviors?
 
I do think that you'll want to create a new movement type. I would use the adventure movement type as a base and then modify GetInputVector so it just returns the input vector instead of always having a positive value.
 
Much appreciated, yeah that makes sense. My immediate tests didn't seem to get me what i want and i presume i'm just not reading some numbers right (i am tired), but when i replace the GetInputVector in an Adventure copy with a normal return, it kinda turns into tank controls and it no longer properly rotates and the inputs get all odd, with Left moving you Back, ect.
Here's a video of it.


it sorta knows to walk backwards but still moves forwards and the axis are messed up. also tried it with different camera styles, same deal.

Would i need to do more than replace the adv's get input with

public override Vector2 GetInputVector(Vector2 inputVector)
{
// No changes are necessary.
return inputVector;
}

Sorry for the hand-holding here, i just haven't touched this part of the ucc before and i can feel the answer is super close but i'm just missing it and it's killin' me.
 
Top