Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Rocket League Ball Cam

Discussion in 'Cinemachine' started by cordmeister, Mar 26, 2022.

  1. cordmeister

    cordmeister

    Joined:
    Apr 1, 2018
    Posts:
    6
    During vehicle gameplay, I have a floating object pathing through the level that I’d like to target once the player is in proximity to better track it as it moves out of view (you’re essentially trying to keep pace with it). I’m trying to frame the player vehicle and floating object together using target group and basic cinemachine functions but am having difficulty balancing a cam that remains close enough to the vehicle to maintain gameplay/control while also hinting at the direction the floating object is heading. Ideally I’d like something akin to the Rocket League ball cam, and wondered if anyone had suggestions for how to accomplish such a thing.
     

    Attached Files:

  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,321
    Have you tried this combo?

    Body = FramingTransposer, Follow target = vehicle
    Aim = Composer, LookAt target = ball
     
    gaborkb likes this.
  3. cordmeister

    cordmeister

    Joined:
    Apr 1, 2018
    Posts:
    6
    Hi Gregoryl, thanks for the response, and apologies for the late reply.
    I arrived at a solution I really like with the following:
    Follow = the vehicle
    Look at = Target Group (vehicle and "ball")
    Body = Transposer (Lock to Target No Roll)
    Aim = Group Composer, Framing using Horizon & Vertical
    Camera Offset Extension = Y -.9 Z -2.15 (Apply After Aim)

    HOWEVER, I've since tried to replace the body with an Orbital Transposer so the player can move the cam with the Right Stick, and although the inputs are showing, I'm getting no player-controlled movement on the camera whatsoever. So I'm once again at a loss...
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,321
    Can you show the vcam inspector, with all sections opened up?