Hey, i try to make the zombie bomb from cso based on player's velocity and user's fistance from the explosion but the knockback power to be 100.0 + player's velocity based on the distance of the player from the bomb, longer distance = less knockback.
But.. didn't work as expected, i know it 100% is wrong but yeah.
PHP Code:
fl_Velocity[0] = (speed + VicVelocity[0]) * ((EntOrigin[0] - VicOrigin[0]) / fl_Time)
fl_Velocity[1] = (speed + VicVelocity[1]) * ((EntOrigin[1] - VicOrigin[1]) / fl_Time)
fl_Velocity[2] = (speed + VicVelocity[2]) * ((EntOrigin[2] - VicOrigin[2]) / fl_Time)
fl_Time = get_distance_f(EntOrigin, VicOrigin) / speed
Edit: nevermind, i got it working the way i wanted eliminating the VicVelocity but
I put the speed as first thing multiplied by entorigin - vicorigin * fl_Time everything / 2