UNITY 2021.3| CINEMACHINE Impulses| Easy Screen Shake Under 5 MINUTES (recoil,explosion,cinematic)

Поделиться
HTML-код
  • Опубликовано: 4 фев 2025

Комментарии • 10

  • @benjamingerd4703
    @benjamingerd4703 5 месяцев назад +2

    2:22 You forgot to use the powerAmount variable. I assume the intention was to use it to scale the direction vector. Like so:
    screenShake.GenerateImpulseWithVelocity(dir * powerAmount);
    A good example is if we have a car colliding with the track fences/walls, and we want the amount of camera shake to depend on the car's speed. This can be achieved like so:
    screenShake.GenerateImpulseWithVelocity(collisionNormal * currentSpeed/maxSpeed * powerAmount);

    • @navarone77
      @navarone77  5 месяцев назад +2

      Yes it seems so, I made this a while ago must've missed lol
      Thank you for bringing this into my attention,
      wouldn't mind remaking this video at some point, cheers!

  • @eqqs
    @eqqs 5 месяцев назад +2

    Thanks a ton!

  • @023achilles
    @023achilles 2 года назад +2

    I was getting Null Reference Exception and thanks to this example I was able to figure it out!
    For others: I had to drag the Impulse Source into (public/Serialized Field) the script where it calls the Impulse Source (called Recoil Shake.cs here but Impulse.cs in mine), and then drag the Impulse.cs (Recoil Shake.cs in this example) to the script where my collision was being detected and triggering the camera shake! It was driving me nuts because I got it to work on one object, and then when I added it (the script) to all the objects that it needed to be on, it started giving me the Null Reference Exception and I thought I was hallucinating.
    "Wasn't this JUST WORKING?!"

  • @AronautAaron
    @AronautAaron 2 года назад +2

    Thanks for the tutorial! Works like a charm!
    For the next tutorials make the text a bit smaller, and expand the visual studio window to cover all the screen. It is super zoomed in, and we can't properly understand the code. Also, don't scroll up and down, or crop that part, it is confusing. Another thing, we can't see you typing sometimes, which also makes it confusing. Final thing you have two Cinemachine Impulse Components, is it an error?

    • @navarone77
      @navarone77  2 года назад +1

      Thanks for watching!
      Feedback is good thank you, I will implement these on the next videos!
      As for the two cinemachine source components on the player, if that's what you meant is not In error, they are two different signal types.
      One is a heavier one for a shotgun weapon, the other was for the pistol signal (re-made for tutorial) which is mild in comparison so I separated them, there shouldn't be an issue using multiple different signals one object.
      Cheers!

  • @dacriaxvgr
    @dacriaxvgr 11 месяцев назад +1

    I'm curious on how did you managed to make a "working" fps controller using cinemachine. I've been struggling to make my existing one work with CM and I always have the problem of it moving to a different direction, or the camera is rotating faster than the character.

    • @navarone77
      @navarone77  11 месяцев назад

      is the Virtual Camera should work the same , just put the virtual camera as child of the player. Same as you would for Camera component.
      Make sure the Body section of the Virtual Camera doesn't have any movement.
      if you need stepbystep help you can reach over to the community Discord server
      discord.gg/adbRVRub