Announcement

Collapse
No announcement yet.

SceneCapture2D looking in wrong direction.

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • SceneCapture2D looking in wrong direction.

    I have a SceneCapture2D camera socketed to my rifle, which I am using to capture the sight picture for the scope. In the viewport the camera is facing forward, on centre line.




    I'm aimed at the targets down range.



    This is where the gun is pointed.


    I don't have any functions attached to the camera. I've tried to add this camera to both the weapon's own blueprint and the player character blueprint, but it behaves in the same way in both.

    Anyone wish to put me out of my misery and point out the obvious mistake I've made? Cheers.
    Attached Files
    Last edited by YourHighnessYourHighness; 09-07-2019, 12:23 PM.

  • replied
    I have solved the problem. The UV island used to project the capture needs to be centred.

    Leave a comment:


  • replied
    I didn't come here for an English lesson, much less having to teach one. reticule
    • n.

      A drawstring handbag or purse.
    • n.

      A reticle.
    I'm only interested in the problem stated in the title of the thread, not linguistics.
    Last edited by YourHighnessYourHighness; 09-12-2019, 07:33 PM.

    Leave a comment:


  • replied
    Again, Unless you mean a woman's handbag it's Reticle, not Reticule. Don't believe me? look it up.


    The only thing I can think of is that you are over-writing the Texture with some other scene capture.
    Put the texture target side to side to the editor, set it to always capture, and see what it's doing and where it's at when the weapon is not aimed. You may be able to understand what's going on that way.

    Given how many options the scene capture 2d object has, you may also just want to create a new specific render target just in case there really is something else somewhere using the same render target.

    Best of luck.

    Leave a comment:


  • replied
    The screenshot was taken while trying a different socket. The offset between the scope and barrel is not 90 degrees, so I don't think that factors.

    There is nothing in the blueprint controlling any aspect of the scope's characteristics. The blueprint is empty except for the rifle, capture camera and reticule.

    Leave a comment:


  • replied
    If you are attached to the socket you should not have any transforms on the scene capture at all.
    Particularly z -90.

    Other then that, do you have anything in the BP offsetting it? Maybe a function to make it zoom?

    Leave a comment:


  • replied
    Thanks for the response. I did something similar. The socket was rotated using a laser as the preview mesh. The socket is facing the correct direction.
    In the render target preview, the barrel and the scope align. It's only when I spawn the rifle in game that the scope looks down and to the right. It's as if the scope socket is inheriting its forward vector from the character, rather than the rifle.

    I'm English. It's spelled reticule here.

    I have an open sight, it just isn't attached. There's no need, since you can't use it when the rifle is scoped.

    The capture is being sent to a material, which is applied to the the ocular lens on the scope. The reticule is a mesh so it can be lit in a specific way.
    I don't want to mess witht the PP until I have the scope properly aligned.

    Leave a comment:


  • replied
    Just a tip of how to make it a little more effortless to begin with.
    add a socket to the rifle mesh just before the front iron sight.
    place an arrow as the preview and adjust the socket to aim the right direction.

    In the BP attach the scene component camera to the socket.

    also, its spelled Reticle.
    An iron sight should be there even while using a suppressor.
    However the iron sight is not normally visible through the scope.

    Working wise, I assume you are pushing the screen capture 2d render target onto the material?
    Perhaps consider a bit of a gaussian blur on the sides via post process material? I wish top of the line glass were ever that clear...
    I see no reason for the "reticule" mesh. It could easily be a texture overlayed onto the render target texture.

    Anyway, after attaching the scene capture to a socket you probably will have solved the initial issue.

    Leave a comment:

Working...
X