Spawn Projectile problem

neogeoflip

New member
For some reason my bullet projectile cant be recognized as a collision. I tried giving the “prefab” rigid and colliders before creating the object. It spawns and shoots using the module, but after playing w the projectiles settings all day i cant seem to get it recognized as a simple collision in OnCollisionenter() any ideas
 
The projectiles never intersect other objects so OnCollisionEnter doesn't get called. For that you can instead override the TrajectoryObject.OnCollision callback.
 
The projectiles never intersect other objects so OnCollisionEnter doesn't get called. For that you can instead override the TrajectoryObject.OnCollision callback.
I don't know but some time the hit point return Vector3.zero.

1678261528643.png
 
Are you able to reproduce that within the demo scene so we can take a look?
 
Are you able to reproduce that within the demo scene so we can take a look?
In the demo scene, equip the grenade and move close to the wall and throw it.
I can set up the pullback ability to make the character don't throw when pullback is active.
But the collision system must return exactly the hit point even when the character does not have the pullback ability.

1678270748262.png
 
In that situation the objects spawns inside another collider the Capsule/SphereCast isn't able to return a valid position. In this situation you can assume that the collision occurred at the location of the object itself. The RaycastHit.distance will be 0.
 
Top