[ad_1]
I’m scuffling with the animation dealing with for my prime down character motion.
The recreation is a 3D prime down recreation. The character is at all times dealing with in the identical route because the pointer and I’ve animations for transferring ahead, sideways and backward.
The thought is to establish the route so the proper animation will be performed. the large drawback is it needs to be relative to the character’s view route.
I’m struggling how to decide on the correct motion animation.
I attempted various things and the best thought I had was to make use of this:
movementDir = Transform.place - oldPosition
and a vector for the route the character is wanting.
However, the movementDir is switching between the proper worth and 0,0,0 and I do not perceive why.
The character is transferring with fixed velocity and the precise place ought to at all times be totally different whereas transferring however in some way it’s as if in some frames the character remains to be on the similar place because the body earlier than.
I’ve tried to discover a resolution for this on google however with out luck.
[ad_2]