Announcement

Collapse
No announcement yet.

Head Tracking (Rotation) problem in world space

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Originally posted by NyxUlrich View Post
    Hey thanks for the reply.

    My setting in Transform modify bone is to add to existing on Rotation. The scale and transformation is remain ignored.

    On the last screen shoot if I don't replace the roll with negative Yaw rotation the head won't follow the ball properly. I tried different settings and tried to ignore the Yaw but doing otherwise gave me strange results.

    One point that I can't understand is why does the character work perfectly fine in the blueprint editor but failed to do the same when placed on a level ?
    Right now I'm trying to follow a tutorial maybe there is another alternative

    Edit: The find to look at node doesn't really give on the Roll value..... Moving the ball on the horizontal line has no effect UNLESS I hook up the Yaw of the look at node to the X of final rotation (This still give an inverted result so I inverted it which looks fine BUT IT"S NOT ON THE GAME EDITOR!!)
    it also depend on your character's rotation in game, in your blueprint, maybe it lucky at proper rotation, try with Roll parameter too, not only Pitch parameter

    Leave a comment:


  • replied
    Originally posted by BoredEngineer View Post
    Roll from LookAtRotation comes into play when your UpVector is not aligned with Z axis. But in such case you would be using different nodes anyway. So you can actually ignore roll all together. There are couple of things you need to be aware of:
    - LookAtRotation assumes that object being rotates is aligned with X axis. Make sure that this is the case for the neck bone
    - space of Start and Target positions defined space in which rotation is calculated. Right now you provide world space coordinates so your rotation will be in world space too. If result is not combined in proper space with existing rotation it explains why it works correctly in editor but not scene - in editor, world space is aligned with local space of character as character is normally at the center of coordinate system. So check that you add rotation in world space, if there is no such option (I think there is) you will have to transform target location into character's coordinate space first.

    When you say you add to existing rotation, do you mean reference pose?
    Thanks a lot for helping. The setting for "add to existing rotation" can be found in the transform bone node. I think in the old version the roll out is called "Ignore and Additive".

    As far as I know I only involve world space location and rotation, but like you said I needed the rotation of the character in the world space.

    Thanks m8, have a great day

    Leave a comment:


  • replied
    Click image for larger version

Name:	1.JPG
Views:	1
Size:	768.5 KB
ID:	1126289

    FIXED IT!.. Turns out I need to get the Actor rotation too... it make sense.... I don't know the math behind it, I kinda brute force my way out. But the pic work if anyone interested

    Leave a comment:


  • replied
    Originally posted by NyxUlrich View Post
    Hey thanks for the reply.

    My setting in Transform modify bone is to add to existing on Rotation. The scale and transformation is remain ignored.

    On the last screen shoot if I don't replace the roll with negative Yaw rotation the head won't follow the ball properly. I tried different settings and tried to ignore the Yaw but doing otherwise gave me strange results.

    One point that I can't understand is why does the character work perfectly fine in the blueprint editor but failed to do the same when placed on a level ?
    Right now I'm trying to follow a tutorial maybe there is another alternative

    Edit: The find to look at node doesn't really give on the Roll value..... Moving the ball on the horizontal line has no effect UNLESS I hook up the Yaw of the look at node to the X of final rotation (This still give an inverted result so I inverted it which looks fine BUT IT"S NOT ON THE GAME EDITOR!!)
    Roll from LookAtRotation comes into play when your UpVector is not aligned with Z axis. But in such case you would be using different nodes anyway. So you can actually ignore roll all together. There are couple of things you need to be aware of:
    - LookAtRotation assumes that object being rotates is aligned with X axis. Make sure that this is the case for the neck bone
    - space of Start and Target positions defined space in which rotation is calculated. Right now you provide world space coordinates so your rotation will be in world space too. If result is not combined in proper space with existing rotation it explains why it works correctly in editor but not scene - in editor, world space is aligned with local space of character as character is normally at the center of coordinate system. So check that you add rotation in world space, if there is no such option (I think there is) you will have to transform target location into character's coordinate space first.

    When you say you add to existing rotation, do you mean reference pose?

    Leave a comment:


  • replied
    You should fix it with one axis at a time. First edit the horizontal movement part so when you move the ball to the right the head moves to the right as well. If it's offset you can add a float value so it lines up. Then do the same with the vertical movement. You probably don't need roll for something like this.

    Leave a comment:


  • replied
    Hey thanks for the reply.

    My setting in Transform modify bone is to add to existing on Rotation. The scale and transformation is remain ignored.

    On the last screen shoot if I don't replace the roll with negative Yaw rotation the head won't follow the ball properly. I tried different settings and tried to ignore the Yaw but doing otherwise gave me strange results.

    One point that I can't understand is why does the character work perfectly fine in the blueprint editor but failed to do the same when placed on a level ?
    Right now I'm trying to follow a tutorial maybe there is another alternative

    Edit: The find to look at node doesn't really give on the Roll value..... Moving the ball on the horizontal line has no effect UNLESS I hook up the Yaw of the look at node to the X of final rotation (This still give an inverted result so I inverted it which looks fine BUT IT"S NOT ON THE GAME EDITOR!!)
    Last edited by NyxUlrich; 04-11-2017, 05:39 AM.

    Leave a comment:


  • replied
    What are you settings inside of TransfromModifyBone and why are you replacing Roll rotation with negative Yaw rotation on last screenshot?

    Leave a comment:


  • started a topic Head Tracking (Rotation) problem in world space

    Head Tracking (Rotation) problem in world space

    Hi guys, I've been stuck with this problem for a while.

    My setup for head tracking is quite humble, I'm just trying to modify a bone to look at a sphere. To achieve this I get the world location of socket attached to my head bone and I get the world location of the sphere component.

    Click image for larger version

Name:	1.jpg
Views:	1
Size:	231.8 KB
ID:	1216365 *Looking fine in blueprint editor

    Click image for larger version

Name:	2.jpg
Views:	1
Size:	307.8 KB
ID:	1216366 *Work as intended in blueprint editor

    Click image for larger version

Name:	3.jpg
Views:	1
Size:	275.1 KB
ID:	1216367 *Bone not looking at the sphere in game

    Click image for larger version

Name:	4.jpg
Views:	1
Size:	323.5 KB
ID:	1216368 *My Anim blueprint setup

    Click image for larger version

Name:	5.jpg
Views:	1
Size:	341.3 KB
ID:	1216369 *Calculation for the head rotation rotator

    This seems fine in the Blueprint editor but when I place her in the game. Things gone really wrong , I had no idea what could be causing this. Something to do with the world space? as far as I concern I did not use any local space for any calculation but it behave strangely only in the game.

    Any ideas?
Working...
X