Search Unity

Best way for vaulting?

Discussion in 'Editor & General Support' started by elzbeb, Mar 31, 2021.

  1. elzbeb

    elzbeb

    Joined:
    Jul 30, 2020
    Posts:
    54
    Hey guys so i have a question, i cant find any tutorials or subject on vaulting so here i am
    I am making an FPS game and tried to implement vaulting using raycasts.
    Can someone tell me the easiest and best way to add this mechanic?
    and if its using raycasts is it better to use 3? I am just really lost on that subject so if anyone can guide me threw when i should call the function, what are the conditions ...
    I would really appreciate that after being stuck on it for 2 days
    Anyways hope everyone has a great day
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,674
    Close-in tight first person environment interaction is an extremely advanced topic. I doubt there is any one single best way, especially considering how varied environments can be.

    I imagine a first pass might be when you reach a vault-able object is to raycast to it, establish some sort of pivot, then play a sequence of positional updates, where you sweep the player through an inverted U arc as they vault, then at the end of it return control to the player.