- Home /
Realistic Raycasting Shooting / Prefab Shooting
I've been making this massive gun script, and i cannot figure out how to make a bullet act as a collider, instead of raycasting it. Spawning a bullet is improbable because the collisions don't always register and The bullet is able to go through the object (Unless you destroy it on collision). So, an alternative is raycasting. But what i wan't to achieve, i'm not sure if it is raycasting, or prefab shooting. Let me explain.
What i'm aiming for, is for the bullet to: Have a curve, not be instant (Travel a distance over time, also with a particle system or something), Have control over distance (Say, not go over 100 units), and finally, the collisions for it not to be buggy.
Example:
Could i use a delay raycast? If so how could i make it travel over a time, instead of being instant? Some games (like battlefield, raven field, etc) use it, so it must be possible. How would i achieve this, and what would be the best way to implement this?
Have you tried to set the collision detection of the bullet's Rigidbody to "continuous"? The collisions should always register, even with high speeds. Using Rigidbodies as bullets should also give you realistic trajectories.
Your answer
![](https://koobas.hobune.stream/wayback/20220612175938im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How do I make bullet tracers show when I shoot in the air? 1 Answer
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Draw line from Player to Mouse position 0 Answers
Photon Unity Networking - Projectile Syncing problem 0 Answers