Hello Folks,
I just wanted to share that the Adventure Camera and Rig + Motion Controller V2 works out of the box with ORK Framework, off course you still need to setup the custom player and camera components but that´s it.
I did found an issue when starting a game from saved data and also when returning from a battle system where the change camera position is being used.

The data about the position and rotation of the Camera is placed into the Camera gameobject transform which in this case is not correct.

Adventure Camera Rig utilizes the Camera as a child object of another GameObject (The Rig) and its local position is set to 0 as default, the rotation and change in position is being managed from the parent rig object. Now, I think the problem is related to the fact that both gameobjects are tagged as "MainCamera".

in order to workaround this issue, you can add this code to your player component.


using UnityEngine;
using System.Collections;

namespace YourNamespace
{
public class CameraRigFix : MonoBehaviour
{

private Vector3 initialPos = Vector3.zero;
private Quaternion initialRotation = Quaternion.identity;
private com.ootii.Cameras.AdventureRig rig;


void Awake()
{
rig =
GameObject.FindGameObjectWithTag("MainCamera").GetComponentInParent<com.ootii.Cameras.AdventureRig>();
if (rig != null && rig.Anchor == null)
{
rig.Anchor = gameObject.transform;
rig.Camera.transform.localPosition = initialPos;
rig.Camera.transform.localRotation = initialRotation;
}
}

// Sometimes to Awake is too late
void Start()
{
if (rig != null)
{
rig.Camera.transform.localPosition = initialPos;
rig.Camera.transform.localRotation = initialRotation;
}
}
}
}



hope that helps
  • Thanks for this.
    Did you try some other popular controllers from the asset store too?
  • edited January 2016
    I did found an issue when starting a game from saved data and also when returning from a battle system where the change camera position is being used.
    I worked with Tim while helping with the MC2 beta to figure out how to get MC2 and its cameras to work within ORK. The posts in his thread from someone else weren't real clear. After we figured it out, he pushed it into the MC2 core and I think ACR inherits from the same framework scripts where he made those changes. So it worked out of the box too. I didn't, however, have a project far enough along where I could test coming in from saved games or switching in and out of battle scenes. I just knew from experience with playing with ORK previously as well as other similar systems (RPG Kit, UMA, or any other system that instantiates a player character within the scene instead of having it already there), that there were issues with having to drag your player prefab to the inspector. Didn't even consider camera control getting switched, although I should have.

    I did notice yesterday that my player character isn't turning to face my NPC when testing the simpleDialogue in the tutorial. Wondering if there is something additional we should have him add to the MC2 core to handle this? I did confirm my Event Interaction attached to the NPC is toggled to both turn the player to event and turn event to player. I'm wondering if I've missed something somewhere else in the setup of the character. With having my custom controller setup in base/control for the player character, I don't have to do anything with animations at all in ORK for that character, right? Since player control is set to None and I have my custom control 0 set to my Motion Controller script attached to the player prefab, right? With this being a new install, I don't have that stuff set up because I didn't think I needed it. When I tested during MC beta, I integrated into an existing ORK project that did have mecanim stuff configured already since I already had NPC characters rigged.

    *ponders* lol

    At any rate, thanks for the script! I'll play around with it when I get to that point in setting things up. :)
    Post edited by Shawn67 on
  • @Gregorik, yes I tried some other popular controls like: Simple RPG Camera (quite good), Opsive´s TPC (didn´t like it much), Invector TPC (same as Opsive), don´t get me wrong, they didn´t fit what I was looking for the character I´m using. And if at the end setting up more animations involve custom code then I prefer to have full control of them, that´s why I created my own character control, now I found Motion Controller that let me continue having control of the animations as well + all cool stuff it has.

    @Shawn67 " I don't have to do anything with animations at all in ORK for that character, right? "
    It depends on the Battle type you are going to use, or lets say if you are using Real Time Battle then you don´t need to bother setting up ORK animations for your player.
    Up to now I´m still using my own character controller + Adventure Camera Rig, I will switch to Motion Controller v2 as soon I finish to map all the animations to the MC framework.

    In my scenario I´m using both, a player prefab with humanoid rig for no battle control and a player prefab with legacy rig for battles (which ORK handles very well). I used Skele to convert the mecanim animations to legacy ones.
  • It depends on the Battle type you are going to use, or lets say if you are using Real Time Battle then you don´t need to bother setting up ORK animations for your player.
    Very cool.. For the most time I was planning to use real time battles. In fact, at this point I'm having a hard time thinking when I wouldn't so it may be that I always will. :)

    Thanks for the info. :)
  • I'm using Simple RPG Camera, it works great for my project needs and is pretty much out of the box and in the game working. I use ORK for my character controller currently, but I may have to check out Adventure Camera and Rig + Motion Controller V2 to see what it has to offer for future projects. Looks interesting, and simple to get going.
    I'm old and mean...hiss~hiss~
    Chris
  • Having some trouble getting it to work out of the box. I think its because ORK spawns an instance of the player rather than the player already starting in the scene. Not sure what I've done wrong but would love for this to work.
Sign In or Register to comment.