Search Unity

Does anyone know how to imitate CS:S Physics?

Discussion in 'Physics' started by Stugger, Dec 9, 2014.

  1. Stugger

    Stugger

    Joined:
    Nov 29, 2014
    Posts:
    5
    Hey, I'm a noob to unity and programming in general so sorry if this is a stupid question, but would anyone happen to know how to imitate counter strike: source physics? I'm really wanting to bring back some oldschool Surfing if anyone knows what I'm referring to, it was a map/game type on CSS in which you'd glide smoothly on an angled ramp about 60 degrees in rotation, and pick up momentum as you'd slide down and then try and catch the right amount of air to navigate through an airborne obstacle or get enough distance on to the next surfing ramp. It was immensely fun for me back in the day and it'd be awesome to be able to enjoy it again and modiy it of course.. I created a first person controller and just rotated a large cube to see if my player would glide, but it just gets really glitchy.. So any ideas/help/answers would be great, thanks! :)
     
  2. Fyve

    Fyve

    Joined:
    Oct 15, 2014
    Posts:
    1
    I'm working on a project that needs this. Yet to work out the ramp physics, but pretty much got the air physics down.

    http://steamcommunity.com/sharedfiles/filedetails/?id=184184420

    The equations at the bottom of the speed limit section are what you're looking for, but the whole thing is an interesting read.

    I'm not familiar with the first person controller (I skipped straight over it); I've been using the character controller and doing all the movement myself. I don't know what the issue with the controllers slope setting is, but the symptoms are this: in source you can slowly climb a slope that is too steep if you run into it at 90 degrees, and you slide down to the side if the angle is different. In unity, if the slope is too high you just can't walk up it.

    In short, for the ramp stuff you will probably need to implement your own slope detection / handling. I've got a few ideas but I'm sitting on them for now. Let me know if you work anything out. Also let me know if want any help understanding / implementing the air physics :).
     
    Last edited: Dec 13, 2014