[Include] projectile.inc - PeppeAC's physics modified and simpler version
#17

Update v1.3:
  • "acceleration" has been removed from Projectile(..) function.
  • Now detecting max and min heights is much better using CA_RayCastLine instead of CA_RayCastLineAngle and there is a workaround done if no collision is detected.
  • Collision detection made more accurate with SA world and Players (players are treated as an object as well so the projectile will rotate accordingly!)
  • "OnProjectileCollide" callback updated with new parameters:
    PHP код:
    forward OnProjectileCollide(projidtypeFloat:xFloat:yFloat:zmodelid); 
  • New function "PushProjectile", lets you add to current velocity:
    PHP код:
    PushProjectile(projidFloat:vxFloat:vyFloat:vz); 
Edit:
Quick update v1.3.2:
- Now timer is one global one since multiple timers were causing trouble since they are SAMP timers!
- Fixed simulation going under ground due to min_height calculation.
Reply


Messages In This Thread
projectile.inc - PeppeAC's physics modified and simpler version - by Gammix - 16.03.2017, 16:12
Re: projectile.inc - PeppeAC's physics modified and simpler version - by Crayder - 16.03.2017, 16:21
Re: projectile.inc - PeppeAC's physics modified and simpler version - by Gammix - 16.03.2017, 16:26
Re: projectile.inc - PeppeAC's physics modified and simpler version - by Roozevelt - 16.03.2017, 16:32
Re: projectile.inc - PeppeAC's physics modified and simpler version - by Crayder - 16.03.2017, 18:37
Re: projectile.inc - PeppeAC's physics modified and simpler version - by Gammix - 16.03.2017, 18:46
Re: projectile.inc - PeppeAC's physics modified and simpler version - by Eoussama - 16.03.2017, 18:49
Re: projectile.inc - PeppeAC's physics modified and simpler version - by Gammix - 16.03.2017, 19:08
Re: projectile.inc - PeppeAC's physics modified and simpler version - by Gammix - 16.03.2017, 19:31
Re: projectile.inc - PeppeAC's physics modified and simpler version - by RyderX - 16.03.2017, 19:31
Re: projectile.inc - PeppeAC's physics modified and simpler version - by DRIFT_HUNTER - 16.03.2017, 20:16
Re: projectile.inc - PeppeAC's physics modified and simpler version - by Crayder - 16.03.2017, 20:17
Re: projectile.inc - PeppeAC's physics modified and simpler version - by Pottus - 16.03.2017, 22:37
Re: projectile.inc - PeppeAC's physics modified and simpler version - by DRIFT_HUNTER - 16.03.2017, 23:02
Re: projectile.inc - PeppeAC's physics modified and simpler version - by renatog - 17.03.2017, 03:34
Re: projectile.inc - PeppeAC's physics modified and simpler version - by Gammix - 17.03.2017, 20:03
Re: projectile.inc - PeppeAC's physics modified and simpler version - by Gammix - 18.03.2017, 15:20
Re: projectile.inc - PeppeAC's physics modified and simpler version - by iKarim - 18.03.2017, 15:40
Re: projectile.inc - PeppeAC's physics modified and simpler version - by AndySedeyn - 21.03.2017, 03:38
Re: projectile.inc - PeppeAC's physics modified and simpler version - by Gammix - 21.03.2017, 15:22
Re: projectile.inc - PeppeAC's physics modified and simpler version - by AndySedeyn - 21.03.2017, 15:32
Re: projectile.inc - PeppeAC's physics modified and simpler version - by Gammix - 21.03.2017, 15:50
Re: projectile.inc - PeppeAC's physics modified and simpler version - by AndySedeyn - 21.03.2017, 15:58
Re: projectile.inc - PeppeAC's physics modified and simpler version - by Gammix - 21.03.2017, 16:05
Re: projectile.inc - PeppeAC's physics modified and simpler version - by AndySedeyn - 21.03.2017, 16:15
Re: projectile.inc - PeppeAC's physics modified and simpler version - by Gammix - 21.03.2017, 16:25
Re: projectile.inc - PeppeAC's physics modified and simpler version - by Gammix - 22.03.2017, 18:06
Re: projectile.inc - PeppeAC's physics modified and simpler version - by AndySedeyn - 22.03.2017, 18:46
Re: projectile.inc - PeppeAC's physics modified and simpler version - by Gammix - 22.03.2017, 19:06
Re: projectile.inc - PeppeAC's physics modified and simpler version - by AndySedeyn - 22.03.2017, 19:12
Re: projectile.inc - PeppeAC's physics modified and simpler version - by Gammix - 23.03.2017, 06:16
Re: projectile.inc - PeppeAC's physics modified and simpler version - by AndySedeyn - 23.03.2017, 12:17
Re: projectile.inc - PeppeAC's physics modified and simpler version - by Gammix - 09.04.2017, 19:35
Re: projectile.inc - PeppeAC's physics modified and simpler version - by Jelly23 - 09.04.2017, 20:41
Re: projectile.inc - PeppeAC's physics modified and simpler version - by Kolstin - 11.04.2017, 14:20
Re: projectile.inc - PeppeAC's physics modified and simpler version - by Gammix - 11.04.2017, 16:22
Re: projectile.inc - PeppeAC's physics modified and simpler version - by PeppeAC - 18.05.2017, 13:09
Re: projectile.inc - PeppeAC's physics modified and simpler version - by Riddick94 - 22.10.2018, 17:22

Forum Jump:


Users browsing this thread: 2 Guest(s)