Instantiate explosion on fast moving object

I know the basics of instantiating a prefab. My code works in that when the rocket hits a wall , an explosion is instantiated. The problem is that my rocket is moving so fast that the explosion seems to “lag” and rather than the explosion taking place on the surface of the object it hits, it explodes more inside the object. So I am thinking what I want to do is OnTriggerEnter, get the EXACT location of where the rocket made contact ( a Vector3?) and instantiate the explosion there rather than the rocket location which is several feet further along its path. But I can’t seem to get the explosion to instantiate at a Vector3 location. Any ideas?

Hi @shadowpuppet, you can the rocket collider’s method, ClosestPointOnBounds(transform.position) in OnTriggerEnter to get a point. See the unity documentation on that.

It seems you have another problem - you can’t instantiate the explosion? We’d need to see your setup and code.

@streetwalker. I like the raycast idea as can tweak the distance cast with rocket speed so could detect the wall a bit early and explode as hits wall/object. This is an old project that I have fiddled with off and on for a few years. Virus lock down has me picking it up again and debugging. The rocket thing was annoying because all the cool visuals were behind a wall. I’m going to play with the raycast . Thanks