Raised This Month: $32 Target: $400
 8% 

Angled surface collision


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Miu
Veteran Member
Join Date: Nov 2013
Old 04-09-2015 , 07:20   Angled surface collision
Reply With Quote #1

I'm trying to predict/recalculate the increase in forwards speed you get when you jump on an angled surface. So far, I have this happening in the tick where the player is on the surface, after the engine has already applied velocity from the collision

PHP Code:
    vel[0] = lastvel[client][0] - vNormal[0] * lastvel[client][2];
    
vel[1] = lastvel[client][1] - vNormal[1] * lastvel[client][2];
    
    
float dot GetVectorDotProduct(velvNormal);
    
    
vel[0] -= vNormal[0] * dot;
    
vel[1] -= vNormal[1] * dot
It's decently close but always below the actual speed you get. Does anyone know the proper math or at least the relevant functions in the game source so I could see for myself?
Miu is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:57.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode