Hi There,
What I’m trying to achieve is that when I hit a specific object I want the hit affect duplicated exactly where it hit on the original object.
So cube 2 has a bullet hole, every time I click on cube 2 it instantiates a bullet hole effect based on the raycast hit point.
Is there a way I can replicate the bullet hole position on cube 2 to cube 1 once it’s clicked
Thanks,
In the general case you can use things like Transform.TransformPoint() and its inverse to do a lot of the heavy lifting for you, in and out of local coordinates spaces and over to the other cube and back to world space.
Thanks for this, I’ve actually figured it out in the end.
What I did was, minus the pos from cube 1 to cube 2 then minused the hitpoint of the instantiated object from cube 1 and 2 and managed to get it to duplicate it on both objects but just calculating the distance from both objects.
1 Like