• Porting HL movement to Unity3d
    7 replies, posted
  • https://www.youtube.com/watch?v=H1miLXW3BCA Started this 2 days ago, basically just 1:1 porting from source A while ago my friend had an idea for a standalone combat surf game with matchmaking, so I might prototype this idea and see how fun it is.
  • Completely unrelated. But how did you get the textures to tile like that instead of it stretching and filling the entire face?
  • Not sure if Crayz is using the same thing but if you import the Prototyping standard asset pack there's a grid shader that does it.
  • I use this shader that maps to worldspace. There's a proper term for it that I can't think of right now, I think Unity has one too but it's not exposed in the editor Shader "Diffuse - Worldspace" {     Properties{         _Color("Main Color", Color) = (1,1,1,1)         _MainTex("Base (RGB)", 2D) = "white" {}         _Scale("Texture Scale", Float) = 1.0     }     SubShader{         Tags{ "RenderType" = "Opaque" }         LOD 100         CGPROGRAM         #pragma surface surf Lambert         sampler2D _MainTex;         fixed4 _Color;         float _Scale;         struct Input         {             float3 worldNormal;             float3 worldPos;         };         void surf(Input IN, inout SurfaceOutput o)         {             float2 UV;             fixed4 c;             if (abs(IN.worldNormal.x)>0.5)             {                 UV = IN.worldPos.yz; // side                 c = tex2D(_MainTex, UV* _Scale); // use WALLSIDE texture             }             else if (abs(IN.worldNormal.z)>0.5)             {                 UV = IN.worldPos.xy; // front                 c = tex2D(_MainTex, UV* _Scale); // use WALL texture             }             else             {                 UV = IN.worldPos.xz; // top                 c = tex2D(_MainTex, UV* _Scale); // use FLR texture             }             o.Albedo = c.rgb * _Color;         }         ENDCG     }     Fallback "VertexLit" }
  • Could you document how you are making it feel like HL movement? I've tried to make something like this, by also trying to look how source did it but I've never got the right feeling on my attempts
  • Yeah sure. After I get it figured out and solid I'll update OP with some info
  • Seems like it's lacking camera shakes. BUT you could probably sell this on the asset store, as I'm sure lots of people are looking for something like this
  • I guess Havok prevents interpenetration while physx encourages it in a way, and intepenetration has been a massive pain in my dick. I don't even have to be surfing to be interpenetrated, I can just be standing still on solid ground. Any sort of interpenetration at all results in shit results out of sweep tests, and it's pretty much fucking everything up. It's been interesting