How to make collision for the rocket launcer in singleplayer shooter?
Hi everyone. I made a rocket launcer and add a second camera for layer with this weapon. I cant add collision for the 3d model of rocketgun because it is bad for gameplay. This rocketgun instantiate rockets near the muzzle. If the weapon passes through the wall, the rockets are instantiated on the other side of the wall. How to fix it?
The only solution that I came up with is to cast a ray from beginning (Point A) to end (Point B) of rocket launcer and instantiate rockets in the point C where did this ray intersects with the wall. I don't think it's a good solution. If you know a simple and reliable solution - please tell me about them.
Why you not just disable shoot ability if you stay very close to wall? for example make trigger collider on gun for detect that you close to wall. And also you prevent damage for player if rocket from player's gun explode close to player. In many shooters we can see animation that hero rotate gun upside and stick closer to self when go close to wall.
Thanks for the answer. Perhaps in my game would be energy weapons firing projectiles. The player should not receive damage from them and the projectiles must add decals in places where in the field of collision with walls. The idea to rotate weapon up and disable shoot ability is good. But the game is very simple and dynamic so I'm not sure what it will do her good.
If somebody knows more ways to solve this problem - I'll be glad to hear them.
I began to think about the fact that i can use not a self-made FPS controller for my goal. Can you recommend some sort of first person controller? I've heard that UFPS is a good Asset. What do you think about it? This asset has an alternative? It's easy to modify, add new weapons/animations to this asset? I'm going to make the game like first doom in 3d. In your opinion best to write self controller or use asset like UFPS for this?
Your answer
Follow this Question
Related Questions
How to change bullet on impact? 3 Answers
Why don't my projectiles collide with anything? 1 Answer
Gun shoot problem? 1 Answer
Scene boundary loop 0 Answers
MY effect dont destroy 0 Answers