[Deprecated] Simple RPG Camera

1374491--85883--$rpgcamera.png

Asset Store Page

Website
Web Demo

On sale for 50% off until Feb. 1st, 2018.
This package will be deprecated at that time. I will provide additional support until March 1st 2018.

Description:
The goal of the Simple RPG Camera package is to provide an easy to implement, no hassle camera control script that is packed with all the features you’d expect it to have and more. It’s designed to work very well with RPG styled games (a WoW or Diablo style), and can be easily integrated into projects of any size without making a mess.

Price:
$15

Package Includes:

  • Camera control script that works on both desktop and mobile
  • Player control script for desktop and mobile
  • A character model from one of my own projects
  • Mecanim and Legacy support

Support:
If you have questions / comments / suggestions / problems, reply to this thread, visit our forum or email us at phatrobit@gmail.com.

Basic Setup Tutorial:

Mobile Use Example (provided by sjm tech):

Version 1.2.1 has now been sent to Unity for review.

Here’s the changelog:

SimpleRpgCamera.cs + MobileSimpleRpgCamera.cs:

  • Added Collision Style

  • RPG style is how collision worked previously (the camera is pushed in front of obstructions)

  • TopDown is a new style, which fades objects out rather than moving the camera in front of them (requires transparent shaders)

  • Added Collision Alpha: This is the alpha value for the faded objects when using the TopDown Collision Style

  • Added Collision Fade Speed: The fade speed for the TopDown Collision Style

  • Added Allow Rotation: Prevents or allows camera rotation control

SimpleRpgPlayerController.cs + MobileSimpleRpgPlayerController.cs:

  • Added CLick To Move: When enabled allows the user to click a location for the player to move towards
  • Added Clickable Tags: Objects with a tag in this list will be clickable for Click To Move

SimpleRpgPlayerController.cs:

  • Added Keyboard Control: Enables the use of keyboard controls or not

Scenes:

  • Added a top down demo scene to showcase the new top down camera style and player control
  • Updated the mobile demo scene to use the new top down camera style and player control

Bug Fixes:

  • The camera is no longer choppy when moving and rotating.

Edit: Wow, I sent in the update 20 minutes ago and it’s already been accepted!

Version 1.2.2 is up for review.

Changelog:
SimpleRpgCamera.cs + MobileSimpleRpgCamera.cs:

  • Replaced Collision Style with Collision Alpha Layers allowing the use of both object fading and object collision
  • Created a custom inspector to clean things up and make it easier to find each setting
  • Added Target Tag which searches for a target with the specified tag instead of setting the target directly

Bug Fixes:

  • The camera now rotates around the Target Offset position correctly
  • Object fading had a problem where, depending on the object position, would not fade back in correctly, but is now fixed

Just bought and its very nice to use. very polished camera control.
anyway can i request few things?
could you add the possibility to strafe left/right and rotate the camera on mobile with swipe?
and make the character control work with mecanim ?

Thanks!

I am very open to requests. A rotation swipe control for mobile is a nice idea and I will definitely work on that. For strafing on mobile, do you mean with button controls or by swiping as well?

As for Mecanim, I am currently developing this asset in Unity 3.5.7, so that would require Unity 4. Anyone who owns my asset that’s still using pre 4.0 will no longer be able to download the updates. I have been considering upgrading it though so I can use things like Mecanim, so I will definitely convert the existing character script (or add a separate one) for Mecanim if I ever do so.

I am also planning on adding controller support for the camera as well in the near future.

for strafing with a dpad or WASD and then rotate the camera with right bouton or with a swipe
about mecanism its a really interesting option for everyone, could have a package for mecanim inside you main package to avoid problems.
the problem with your controler is that anim name are write in the script so we cant adapt it with different players,
maybe put the strings for each animation in the inspector and an option like if strafeLeftString = “null” dont play the animation ( in the case where we only have 1 walk/run animation)

Ah I see. I will do some work on the player control scripts as well to try and make them more modular and customizable through the inspector.

I will see what I can do for including Mecanim support, but at most it will only be a separate player script until I decide to upgrade the project to Unity 4.

Version 1.2.3 is now being reviewed.

Changelog:

  • SimpleRpgCamera.cs

  • Added Alternate Rotation Keys under Rotation Settings > Allow Rotation. This allows camera rotation with key presses as an alternative from the mouse

  • MobileSimpleRpgCamera.cs

  • Rotation is now controlled by swiping

  • Removed obsolete rotation settings

  • MobileSimpleRpgPlayerController.cs

  • Updated movement control to be friendlier with the camera (don’t move while zooming / swiping)

  • MobileDemoGUI.cs

  • Simplified to just display version info and quit button

  • Bug Fixes

  • Fixed a raycast error that occured when distance was 0

Version 1.2.4 is now being reviewed.

Changelog:

  • Bug Fixes

  • Fixed raycast error yet again

  • Return/Rotation Smoothing can no longer be less than 1

  • DemoGUI and MobileDemoGUI no longer generate errors when the camera / player variables are null

  • Updated readme.txt to match current camera inspector values

Hi, I just bought your asset.
excellent work.

I get an error that looping can you help me?
(sorry I do not speak very little English)

Unity version : 4.2.2f1

during installation of the asset
Error 1 :
m_InstanceID == 0
UnityEditor.AssetPreviewUpdater:CreatePreviewForAsset(Object, Object[ ], String)

error given in the examples offered
error 2 :
UnityException: Input Axis Mouse ScrollWheel is not setup.

Thank you

Thanks Kintaro and I’m glad you like it!

This can usually be ignored.

The Mouse ScrollWheel axis should automatically be created by Unity when you start a project. If you don’t have the axis in your input settings, this can be fixed by adding a new input located in Edit > Project Settings > Input with the below settings (copied from Unity’s defaults):

Name: Mouse ScrollWheel
Descriptive Name:
Descriptive Negative Name:
Negative Button:
Positive Button:
Alt Negative Button:
Alt Positive Button:
Gravity: 0
Dead: 0
Sensitivity: 0.1
Snap: false
Invert: false
Type: Mouse Movement
Axis: 3rd axis (Joysticks and Scrollwheel)
Joy Num: Get Motion from all Joysticks

It would be nice if you could implement a 3rd person touch camera like in Heroes Castles: http://www.youtube.com/watch?v=K4RihyLjExk or Ravensword Shadowlands on iOS: http://www.youtube.com/watch?v=uiUnknZbyms

These controls seem to be both swipe and drag based, and they are very smooth

Cool, I will look into improving my mobile script to replicate those videos! Thanks!

Version 1.3.0 has just been sent to Unity for review. For this update I have upgraded the package to Unity 4.3 due to many requests for Mecanim. If you still use Unity 3.5, contact me and I will try to work something out so you can get the update as well.

If you do not want to wait for Unity to review the package, contact me at phatrobit@gmail.com with your invoice number and I will send you the package directly.

Changelog:

  • General

  • Upgraded project to Unity 4.3

  • Added mocap animations for use with Mecanim

  • Added a joystick control for mobile

  • Rebuilt the demo scenes

  • Cleaned up deprecated code

  • Deleted old player controller scripts

  • Deleted old player animator scripts

  • Deleted mobile demo gui script

  • Added new MouseMovementController script

  • Added new KeyboardMovementController script

  • Rebuilt player prefab to use Mecanim instead of Legacy

  • MobileSimpleRpgCameraEditor.cs

  • Fixed an issue with the Objects To Rotate and Objects To Fade fields

Version 1.3.1 is now being reviewed by Unity.

Changelog:

  • General

  • Updated and reorganized demo sources to work better with other PhatRobit products

  • SimpleRpgCamera.cs

  • Script now generates an empty GameObject (_SRPGCinvisibleTarget) to support new RTS style edge scrolling movement

  • Target Settings:

  • Added Lock To Target

  • Added Allow Edge Movement

  • Added Edge Padding

  • Added Scroll Speed

  • Added Follow Target Key

  • Added Alternate Camera Scrolling Keys

  • Added Show Edges option

  • Rotation Settings

  • Added Right Click Origin option under Return To Origin setting

  • SrpgcMouseMovementController.cs

  • Added support for characters that don’t use Mecanim’s animation for movement

Version 1.3.2 is now being reviewed by Unity.

Changelog:

  • General

  • Renamed demo source folder to SRPGCSources

  • SimpleRpgCamera.cs

  • Target Settings

  • FIX: Edge movement now works correctly when camera is rotated

  • Rotation Settings:

  • NEW: Togglable mouse buttons for Allow Rotation

  • NEW: Togglable lock cursor for individual mouse buttons

Version 1.4.0 is now being reviewed by Unity.

Changelog:

  • Scenes

  • NEW: MobileSRPGC - Rotation Test

  • SimpleRpgCamera.cs

  • NEW: Movement Settings

  • MOVE: Edge movement settings moved here

  • NEW: Options for allowing edge / key movement or not

  • NEW: Limit Bounds

  • NEW: Boundary Origin

  • NEW: Boundary Size

  • MobileSimpleRpgCamera.cs

  • NEW: Movement Settings:

  • NEW: Allow Panning

  • NEW: Pan Type (Drag)

  • NEW: Panning Sensitivity

  • NEW: Panning Touch Count

  • NEW: Pan Type (Swipe)

  • NEW: Pan Amount

  • NEW: Pan Speed

  • NEW: Panning Allowed Directions (X / Y)

  • NEW: Pan Invert Direction (X / Y)

  • Rotation Settings:

  • NEW: Rotation Type with Drag or Swipe option

  • NEW: Swipe Active Time

  • NEW: Swipe Min Distance

  • Zoom Settings:

  • NEW: Invert Direction

  • SrpgcJoystick.cs

  • FIX: Animator now always runs forward according to camera direction

  • NEW: Instant Rotation option

Version 1.5.0 is now being reviewed by Unity.

Changelog:
I have rewritten most of the code in SimpleRpgCamera.cs to clean things up and allow a new feature.
The new feature (Use Target Axis) can be seen on the new scene SRPGC - Orbit Demo

  • Scenes

  • NEW: SRPGC - Orbit Demo

  • SimpleRpgCamera.cs

  • Collision Settings:

  • NEW: Collision Buffer

  • Target Settings:

  • NEW: Use Target Axis

This gets better with every update, thank you!

In version 1.5, I noticed I lost zoom with mouse scroll wheel functionality. Am I overlooking a setting somewhere?