Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement camera movement #69

Merged
merged 4 commits into from
Dec 26, 2017
Merged

Implement camera movement #69

merged 4 commits into from
Dec 26, 2017

Conversation

jonpas
Copy link
Member

@jonpas jonpas commented Dec 25, 2017

  • Close Implement camera movement #57
  • Implement camera movement while holding down Right Mouse Button and moving the mouse (X and Y axes)
    • Limited by board edges
    • Reverse values to simulate or give illusion of moving the map around (as in you hold to the map and move it around)
  • Implement camera zooming using Mouse Wheel Up & Down
    • Limited to minimum of 100.0 and maximum of 500.0 (easily tweakable in C++ Constructor or Blueprint)
  • Add AETVCameraDirector (and inherited Blueprint BP_CameraDirector which is set as Default Pawn Class)
    • Pawn (controllable Actor) which gets moved around
    • Scene component (invisible) with a Spring Arm and Camera (additionally Static Mesh if debug enabled to visualize current Camera Director position in world)
    • Control input, easily extendable with more ways of controlling
      • Enable Movement (hold Right Mouse Button)
      • Move (Mouse X and Y axes)
      • Zoom (Mouse Wheel Up and Down)
      • Uses bound actions (ability to allow the user to change them if ever wanted in the future)
    • Move Above Tile method for moving camera to a tile on (X, Y) coordinates of the Tile Map
      • Ability to specify zoom percentage (default retain current zoom)
      • Requested by @Nevith for moving to ships upon clicking them in Ship list
  • Change Tile Map Z location to 0.0 and Ship Actors to 0.1 (streamlining, closer to center the better)
  • Fix GetWorld() being nullptr and causing a crash in Action class
    • UObjects don't have a path to GetWorld() always set, override with valid path set using owner of the action (Ship) as Actors always have a valid path to world
  • Opens Ship Actors make camera jump around if at similar height #68, but currently worked around by having Camera Director 20 UU (Unreal Units / centimeters) higher
  • Adjusts targeting for new Tile Map location and dynamic distance from it due to Camera Director zoom

@jonpas jonpas added this to the Week 7 milestone Dec 25, 2017
@jonpas jonpas self-assigned this Dec 25, 2017
@jonpas jonpas removed the WIP label Dec 26, 2017
@jonpas jonpas merged commit 20fd977 into master Dec 26, 2017
@jonpas jonpas deleted the camera branch December 26, 2017 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement camera movement
2 participants