Search Unity

A call to revolutionize 1st person adventure!

Discussion in 'Getting Started' started by Funwill, Dec 3, 2022.

Thread Status:
Not open for further replies.
  1. Funwill

    Funwill

    Joined:
    Nov 10, 2018
    Posts:
    128
    My greetings to you all!

    It's time to bring 3D gaming into a new era, where realism would finally match the fun. Let's do away with those dark times when our heroes could travel countless miles, in hostile and wild lands, without ever slippin or trippin on a treacherous root.

    So it is especially to you, coders and programmers of all countries and all faiths, that I address this terrible gap in the thrill and challenge of 3D adventure.

    Which script for my character controller to have a chance, tiny but possible, to stumble and even fall flat on the ground, with risk of injury, or worse?... A chance that would be modified by the environment, the speed of the character and particularly the degree and difficulty of the slopes. The best would be to add a modifier of agility, stress and even the influence of the wind.

    A script should not be too complicated it seems, applying a low percentage of stumble and fall to the character in its movements, with its different modifiers. I noticed that by removin the kinematic option from the rigidbody, my player camera was rollin and goin all over the place, and this is pretty much the effect I was searchin for a fall on the net, without much success. So, with a fall, it would just remove the kinematic option for the time of the fall to have an imersive visual, and put it back on afterwards.

    I would code it myself, but unfortunately I don't have the skill yet. But I'm workin on it, takin my first steps in programin by followin the 'create with code' course, even if I still have a long way to go, without too many falls I hope ;)

    Cheers!
     
    Last edited: Dec 3, 2022
  2. RichAllen2023

    RichAllen2023

    Joined:
    Jul 19, 2016
    Posts:
    1,026
    To be able to write code, you need to be able to use good grammar and spelling, having read most of your posts, you fail on both counts mate.
     
  3. Funwill

    Funwill

    Joined:
    Nov 10, 2018
    Posts:
    128
    It's just that to read me corectly, you shouldn't be too thick nor too mean... You fail on both counts.
     
    Last edited: Dec 3, 2022
    Schneider21 likes this.
  4. DimitriX89

    DimitriX89

    Joined:
    Jun 3, 2015
    Posts:
    551
    The basis of most "physical"-style controllers is Rigidbody.AddForceAtPosition command. Think about it as attaching puppet string to an object (say, top of the capsule) then pulling in a specified direction (world Up vector to stay upright). Properly calculating those "strings" direction and intensity is infinitely more complex, though. An asset literally called "PuppetMaster" does it by calculating forces from an animation's keyframes, for example

    Personally I do not sold on the idea, to be honest. It wont revolutionize the gaming; most likely it'll result in niche experience for masochists. Physical controls are unstable and commonly used for comic effect or deliberately inducing rage. Think QWOP or Getting Over It. Human legs adjust to terrain more or less automatically, thanks to system of reflexes. Stumbling is not a thing most players want to be accurately replicated
     
  5. Funwill

    Funwill

    Joined:
    Nov 10, 2018
    Posts:
    128
    Thxs for the feedback, but it's not only about stumblin, and neither it's masochistic. it's all about realism and the dangerousness of treadin in precarious ground. I'm makin a game where climbin and scalin are important, so i cannot have my player controller walk on steep, slippery, rough slopes as a stroll on a flowery field. I need it to stumble, slips, trip, and fall dependin on speed, stress, environment and skill. Steps will have to be careful now, walkin along a cliff, and with a camera fallin head over heels also.

    Haven't found the PuppetMaster asset, but i don't think i'll need animations added just to mess my camera out. Cheers!
     
  6. DimitriX89

    DimitriX89

    Joined:
    Jun 3, 2015
    Posts:
    551
    Here are some more tutorials on ragdolls. Even if you dont need animation, you can use its fundamentals for balancing your character's capsule using forces

    Also, you can use Physics.Raycast to get a normal (surface direction) of a terrain beneath a character's feet. Then you can compare it with some reference direction (like world up direction) using Vector3.Dot, and activate "stumbling" or "slippering" code if the slope is too steep. (If those terms do not ring any bells, watch a few regular 1st person controller tutorials on Youtube before starting on yours. What you attempt is a complex task)
     
  7. Funwill

    Funwill

    Joined:
    Nov 10, 2018
    Posts:
    128
    Interestin video and i particularly apreciate the balance movement of the ragdoll yes. Now, it shouldn't be too hard to transpose a 3rd view to a 1st, right?

    I'm slowly learnin my way on programin with 'create with code' tuto, and found also this series (
    ) wich seem apropriate, though there's no writen code below. And i got all my time, explorin while creatin my open world. :)
     
    Last edited: Dec 4, 2022
  8. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    9,051
    Closed, off topic and unclear.
     
Thread Status:
Not open for further replies.