SceneCapture2D Component CLIPPING ISSUE

Hello
I’m developing a UI with a telescope function as shown in the video below.

However, as you can see in the video,
clipping occurs when looking at angled figures such as cubes.

When the cursor is facing the Cube like the video,
the result I want is shown in the picture below.

ex

I want to implement the CUBE model itself to be visible.

My BP is in the picture below.

I tried adjusting the Near Clip Plane, but it didn’t work.

Can you help me with this problem?

3 Likes

I think the problem is putting the render target at the hit location. Have you tried using the normal at the hit location, and backing off a bit to get away from sharp edges?

No, thinking about it, normal might look weird, because you want the render target to always be looking at the camera. But backing off some distance ( along the camera vector ) would be the answer, I’m thinking.

3 Likes

Thank you for your reply!
As your opinion, I tried to implement the backing off some distance along camera vector function,
I don’t have a clue…
If you don’t mind, can you explain roughly how to implement it?

This was the best way to do it,
But I don’t think this is right

3 Likes

I’ve put the render target ( just a disc ) in the character, at the camera location

I made sure the X axis is in line with the target to avoid having to do any transforms.

The idea is to only move the target along the camera axis, so it’s always facing the camera. I was wondering about object location - bounding box, but that doesn’t work for large objects. It turns out, just moving the target back along the camera vector a little seems to do the trick.

RT

3 Likes

Thank you so much for your time !
I think my explanation was a little lacking, sorry

I’m planning to make a game from the Top-Down point of view.

So I want to create a zoom feature that feels like the game in the picture,
Would you give me one last chance to help?

2 Likes

Is the target supposed to remain the same distance from the camera? How is it supposed to work?

2 Likes

Yes! the cameras must always keep the same distance.
Like looking through a telescope
It has a similar function to a scope with magnification !

1 Like

Right, so keep the render target disc as a component in the camera blueprint, and you can just fix the distance.

Then I think you can use the code I put here before to figure out where to have the render target camera?

1 Like

May I change the render target disc to SceneCapture2D?

And if you don’t mind,
I’d like to see Start and End Pin on the “LineTraceByChannel” part of the picture you sent me,
Would you send me the picture again?

I’m sorry to keep letting you use your time from the standpoint of help…

1 Like

You can use a SC2D, and put the material on the disc. That’s what I was assuming, but whatever works for you.

It’s a standard trace, I’m just trying to find the object in front of the normal camera

I’m assuming you’ll want the SC2D where I have the pink disc? Close to the object.

1 Like

Oh, I am really sorry.
It’s not moving with the camera
SceneCapture must be operated by the mouse.

I tried what you implemented and it’s exactly how I want it!

For the last time
May I know how to implement SceneCapture components to move by Mouse
and not by camera movement…?

I’m trying this way
Is there any other way…?

That’s a valid way of pointing at objects.

So that camera doesn’t move?

I think you still have to point the SC at the camera, otherwise it will look weird. You would need ‘look at’ for that on the disc ( if you’re using a disc ). And that’s when you need the X axis setup like this, because ‘look at’ points the X axis.

Yes, the camera doesn’t move.

I’m trying to create and implement an additional camera
Is it possible to implement it by adding a camera component to the character BP that moves where the mouse moves, and adding SC to the second camera?

Totally possible, I think. Or you can spawn something and control it from the player. Destroy it when ‘scope mode’ ends.

1 Like

Oh! I’m also trying to implement it by adding a controllable camera within the world.
I’ll try and come back! Thank you!

1 Like

I tried it, but the desired result didn’t come out…
When the camera and SC movements are implemented through the mouse cursor,
clipping continues to occur.

This BP is a controllable camera BP.
If I run it through this, it came out as shown in the video below.

CLIPPING happens like a video

If I ignore all of the above BP and try as you told me,
I can see that CLIPPING is not happening the way I want it to,
that is, it comes out the way I want it to.

As you can see, CLIPPING is not happening.

I think if I integrate them well, I’ll get the results I want, is there any good way…?

Let’s say you move the cam using the mouse. You find the location you want to put it at.

Then, from that impact point, you can get a vector to the the main camera. It’s just location A - location B. This also gives you the rotation ( forward vector ).

Now you can make the SC face the camera, and move back along the camera vector a bit to avoid clipping.

Does it make sense?

(post deleted by author)

Ok, first, placing the SC at the cursor

RT1

Now we need to make it face the camera. Like I say, there’s a vector from the impact point to the camera. We can get rotation from that, to make the disc face the camera

RT2

We also need to get it away from the objects by a certain amount, in the direction of the camera. We already know the vector for that, we can normalize it so we can add it to the location

RT3

Does that cover it? :smiley:

1 Like