Quantcast
Channel: Latest Questions by Kerihobo
Viewing all articles
Browse latest Browse all 74

Make a character controller shake.

$
0
0
Hi boys and girls, I have a fairly complex player_movement script that I wrote, myself. It utilises unity's character controller component. I basically want to get characters hit by "special power beams" to stop responding to gravity and player input, and shake wildly on-the spot. locking off gravity and player movement I can manage, but what's a good way to get character controller to shake? I know how to pass a vector3 into controller.move, like: controller.move(moveDirection); but not sure how to use this to get a shaking effect. Any thoughts on an efficient way to do it? I am currently thinking I would create two lerp movements, one that interpolates between left and right movement and one for up and down movement, at varying speeds they could possibly get a good shaking effect? a good or bad way to do it?

Viewing all articles
Browse latest Browse all 74

Trending Articles