Integration with Camera Perspective Editor?

zebbizebbi Posts: 11Member
I'd like to use Camera Perspective Editor to create a 2.5d style y-shearing effect, but I'm uncertain when to start. The author of the asset has told me: "From the CPE side, just take a look at which projection matrix values are modified by the vertical (y-axis) of lens shift. Then, in UFPS, you'd find where vertical-look input is handled and modify it to control the values CPE controls for vertical lens shift. Beyond that you may need to modify UFPS to move the first-person view weapons accordingly"
and I wondered if anyone has any suggestions as to where I should begin?


  • TryThisTryThis Posts: 963Member
    I don't know if I know anything about this ... 'cause I don't know anything about 2.5d, and even less about camera perspective editors, but you can get the camera yaw (y) from a number of places in the codebase. I suppose that for an easy place to start, working in single-player, you could monitor vp_LocalPlayer.Camera.Yaw . You could also check that vector2 in the player event handler (vp_PlayerEventHandler) where a vp_Value always knows what the pitch and yaw is doing all of the time. The vp_FPCamera always knows what yaw is doing, and vp_BodyAnimator can tell you the current head look yaw if that's of any use. It will be fun to see a video of what you are doing after you get it working!
  • zebbizebbi Posts: 11Member
    Thanks, I'll post one when I get it working! The trouble is I'm not too good with coding from scratch, although I can definitely mod files if told and shown what and where
  • TryThisTryThis Posts: 963Member
    Start small. Make a clean scene, where you work on just one thing. Experiment with that other product (the camera perspective thing) and send it some values (or what ever you are supposed to do with it). Keep it simple until you understand how it behaves.

    Search this forum for the file names that I mentioned and you'll find examples of how to work with vp_LocalPlayer, vp_PlayerEventHandler (a central concept of UFPS) and vp_FPCamera.

    From there, unless you get really lucky and find that someone else here has that other product, you are just going to have to do the work. You'll get better at "coding from scratch" much quicker than you would imagine. All of the good stuff comes at the price of effort.
  • zebbizebbi Posts: 11Member
    Camera Perspective thing is a script that attaches to a camera with values that can be adjusted, and I think the idea is that when UFPS normally rotates on the vertical-input, this would be instead fed into the vertical tilt shift of Camera Perspective editor. I've never modified the scripts from scratch before, so I have no idea how to go about sending the mouse-look vertical input into the tilt-shift component?
Sign In or Register to comment.