I set my camera to not to go through walls but when my practice dummy gets in the view of the camera, it zooms in very closely. How can i fix this?
One technique would be to shoot a ray out from the camera, if you detect other than your player, hide in world the actor that got in the way if it’s one appropriate for that, then keep an array of references to anything you’ve hidden. That is to unhide them later when the condition no longer exists. For example, you’ll see this apparent in Witcher III where they do it with trees and NPCs.
More so something like this. I dont want anything to disappear but act as if its uneffected at all.
when you say ray, do you mean like the cameraboom?
Hi there,
Looks like your practice dummy has collision settings that block camera. You can disable it in the collision settings that appears when you select a mesh or collision sphere.
One good technique to hide actors from camera view is to use the technique called “camera fade” that uses “depth fade” nodes in the materials property. This video shows the results at time 07:30
Sounds like L.F.A. has a better solution that doesn’t require programming, but when I said “Ray”, I meant do a “Line Trace By Channel”, aka ray trace, from camera position to your actor to see if any actors are between the camera and the player character. If so, those actors can be temporarily hidden.
My suggestion was mistakenly responding to actors that get in the way which block camera view. Sounds like your requirement is not that.
The solution is very simple
Check your “Spring Arm” - it has an option for that, it’s this here:
Hope that solves your issue
I’m assuming you’re using the standard character setup, with a SpringArm, and the Camera outside on it.
There’s a simple checkbox that can fix this behavior.
Select the training dummy, scroll to “Collision” and change the collision response for “Camera” trace queries:
This says “this object doesn’t block camera queries.”
This will generate clipped geometry if the camera happens to “zoom through” the body of the dummy. Thus, you may still want to hide the dummy if it’s really close to the camera, but maybe your particular camera management and angles work well enough without that.
That’s another cool solution I actually didn’t thought about at all
Your way it adds more flexibility to the Collision so some stuff may actually affect it if wished by the Dev
When the camera is low enough, it works but once i raise it up, the practice dummy pushes it close up again. Is that suppose to happen and i its something i need to fix or did i do something wrong?
You may have other components or actors that also need to have their camera channel collision ignored.
You can enable collision visualization to see where the colliders in your scene is, in the “Show” menu in the viewport. Then examine each to figure out whether you want it to ignore camera queries or not, and configure it appropriately.
Thank you so much! I had forgot i had added a random sphere into the blueprint. ^_^;