Hi, I dont speak english verry well but I understand
I am making an fps and I need help on some points:
First I need to make my gun shoot, and 2: I need to make my monster get damage when it touch bullet
Can you give me Some js script or explain me how to do it Pls ?
Thank you verry much if you help me.
What language are you more comfortable with ? I’m french if you prefer.
Anyway, shooting an make damage, here are the things to know/do
- Bullets are really fast, so it’s either ineffective to use collision detection (Discrete) or have a big impact on performance (Continuous).
- It’s best to cast a ray and instantiate only the visual part (and again, that last part could be discussed).
- About the damage, you need to see the two differents parts : Detect the event “Damn, I’ve been shot !”, and what to do when it occures.
- With collision detection, it’s going to look like that. The raycast, it’s with the RaycastHit.
- When you caught the event, decrease a life value, if it’s < 0, he dies. Destroy / Animate / particles / whatever.
Ouais, je suis français , désolé si je n’avais pas répondu, je n’avais plus internet. Aurais tu le courage de le refaire en français stp ?