The Organization

High Targets

Doing a project where we have a fixed camera, and the "gun" is quite high off the ground. Then we have targets on the ground, that we would like the gun to be able to shoot. But we don't want to worry about bullet intersecting with the gun or anything between the gun and the target on the ground. So what i did was, create a tall collider and "billboard" it such that it always faces towards the camera. This way, you can aim at the target on the ground, the gun rotates and points in the right direction, the bullets travel in the right direction, and they collide with the object! Looks good, and was very easy to implement. Could be an issue for cases where the target is behind cover or other stuff that should block the shots, but i'll cross those bridges when i get to them.

work programming unity3d permalink