Skip to main content
Up and Coming
September 12, 2013

Animations and full body approach?

Hello, trying to implement some nice animations to my first person model that im using.
The issue is that animating him will make the attached camera move in nausea inducing ways since its attached to the player model.
What is your approach to this problem? Even a simple walk animation will make the camera bob and even worse when using more advanced animations like dig or chop when the player bends his body.
    This topic has been closed for replies.

    13 replies

    Up and Coming
    September 12, 2013
    I have setup a mecanim avatar with the following:
    1) To control hands - IK limbs using the Sixense Object Controller script placed on an empty game object that is the IK limb script's 'target' and has the wrist bone and lower bones of the hand as its children. This approach means I don't have a nice animated hand but rather just a way to drag the wrist around.
    2) Positional tracking - as a child of Spine 1 and as the parent to Spine 2 I have an empty game object with another Sixense Object Controller script for the left hydra.
    3) OVR Camera is a child of the Positional tracking game object noted above and is set to follow an empty gameobject which is the child of the base avatar game object that has the animator and colliders on it.

    I experimented with quite a few different placements of the OVR Camera, and the above approach leaves slight headbob, but I think it is quite tolerable. For those who can't take any headbob I added a script where if you press 'T' the OVR Camera will re-parent itself to the base avatar gameobject which removes all the headbob leaving your 'head' floating above the avatar body, so it looks strange from that perspective, because your body will move underneath you as though it is disconnected.

    Hope that helps!
    virrorAuthor
    Up and Coming
    September 13, 2013
    Thanx for the great explanation : )
    How would you handle animations that requires the player to bend and were the head pos would change a lot, like a mining animation or similar? Currently for me it feels like being thrown around when that happens : p
    Really want a body but cant really find a good solution for this kind of problems : /
    Up and Coming
    September 13, 2013
    "virror" wrote:
    Thanx for the great explanation : )
    How would you handle animations that requires the player to bend and were the head pos would change a lot, like a mining animation or similar? Currently for me it feels like being thrown around when that happens : p
    Really want a body but cant really find a good solution for this kind of problems : /


    No problem! A couple of untested thoughts:

    1) Modify the subject animation to minimize movement of the portions that would toss the head pos around; OR
    2) Script so that when subject animation state is running the OVR Camera is temporarily re-parented to the base avatar gameobject for the duration of the subject animation state, while concurrently triggering a separate animation affecting the OVR Camera object that will animate it to more gradually follow what the body animation is doing, and when subject animation state is exited the OVR Camera re-parents to where it was originally.
    virrorAuthor
    Up and Coming
    September 14, 2013
    Yeah, seems like there are no optimal solution : p
    Up and Coming
    September 15, 2013
    Check out my demo vid here. Is this the sort of thing you trying to achieve?

    https://developer.oculusvr.com/forums/viewtopic.php?f=29&t=4134

    I will be posting an updated video soon. Showing the character movement.
    DK1 Order #: 48xxx. Status: DK1 Owner since March 29th, 2013. DK2 Order #: DO-0154xxxx. Status: DK2 Owner since July 28th, 2014 My Stygian Abyss Demo Remake Blog http://mrob76u.wordpress.com
    virrorAuthor
    Up and Coming
    September 16, 2013
    Seems like you are more focused an the Hydra integration, saw your video before and are really looking forward to seeing more : )

    I will try to explain in more detail.
    What i want is full body immersion in the game, so when walking i want to be able to see the legs moving etc, nothing strange or hard here. The big issue comes with more advanced animations, using mining stone as an example:
    When mining the upper body is bent forward in the swing and the head is tilted down, and then back up again as the animation finishes, do this 20 times in a row and im pretty sure most ppl would not feel very good in the Rift : p
    My game will have a lot of actions like this, digging, mining, gathering and so on.
    I guess i have to choose between breaking immersion or making the player feel sick : p
    New Participant
    October 18, 2013
    Hello virror,

    at the moment me and my team are working on a similiar effect and we have the same problem. We have a Gameobject that follows the neck pivot posistion and rotation.
    In unity i have tried some setting with the Model and when i disabled the joints that has a effect on the head it was ok but the animation was bad. I think a good solution is to create a joint in the model that doesent have any effect of the weighting. On this Joint you place a GameObject that follows the position and the rotation of the Player.
    In the next Week will will try this than i can say more.
    Up and Coming
    October 18, 2013
    If you attatched a script to the OVRPlayerController that moved the camera instead of attatching it to the model it would probably work, this is what I'm doing for my skybox

    GameObject ObjA = GameObject.Find("skybox");
    GameObject ObjB = GameObject.Find("CameraRight");

    Vector3 SkyBoxPosition = ObjB.transform.position;
    //corrects the y value so it doesn't move with the camera when it goes up and down
    SkyBoxPosition.y = 0;

    ObjA.transform.position = SkyBoxPosition;


    you would need something to handle the rotation too I guess
    Participant
    October 19, 2013
    @ virror:
    When mining the upper body is bent forward in the swing and the head is tilted down, and then back up again as the animation finishes, do this 20 times in a row and im pretty sure most ppl would not feel very good in the Rift


    Why not just redesign the game to be more Hydra specific? For example, instead of having to mine with an animation, you could (given decent enough sensors) have them physically swing a virtual pickaxe mining for stuff. In the shorter term given the limitations of Hydra, replacing the mining animation with the concept of a 'magic pickaxe' that does the mining could also do the job. IOW, they select the 'magic pickaxe', apply to the rock, and it does the work that the animation would normally do. Because the user is doing the base motion (bending to apply virtual pickaxe to virtual rock), this approach could reduce sickness, as well as breaking immersion less.
    virrorAuthor
    Up and Coming
    October 19, 2013
    Yes, been thinking about that as well, but i don't want to limit the game that way. As i plan on selling it i would miss out on 99% potential customers : p
    One other solution might be to scrap the "action" animations in first person and only play them for the connected multiplayer characters. This would decrease immersion a bit but would simplify it a lot and also probably make it a better experience in total.