Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Damage in diameter when throwing hand granede

Years of Service
User Offline
Joined: 17th Apr 2013
Posted: 24th Apr 2013 13:38
I am developing A fps in which i have succeeded so far throwing a hand missile/hand granede but don't know how to show damage for enemy if enemy comes with in radius of hand granede thrown, can some one guide me
Years of Service
User Offline
Joined: 8th Oct 2008
Posted: 24th Apr 2013 15:22
A simple quantitative way would be like this:
- On explosion, loop through each enemy
- Using each enemy's position coordinates, find the distance from the explosion.
- If the distance isnt under a certain value, then the enemy hasn't been hit.
- Else, Raycast along the path from the explosion to the enemy to see if there is something in the way
- If the ray cast returns nothing, then calculate the reduction of health based on the distance away.

Login to post a reply

Server time is: 2024-04-13 04:16:22
Your offset time is: 2024-04-13 04:16:22