1. #1

    OPE "perspective" problem.

    So, Im making a skill game with a custom character (3rd person perspective using directional forces glued to the custom character, and i started using https://docs.google.com/drawings/d/1...F4g/edit?pli=1 this tutorial to have an enemy always facing the character, and it works great, except:

    The trigger that activates the enemy is in a 3D world. So If the custom character isnt facing the enemy when its triggered, the rotation is all out of whack, like his back or side rotates to face you.

    Is there a better way to do this? Basicly I just want a certain side of an object to face the character, regardless of where the object appears on the map.

    It should also be noted that I made a slight change to this tutorial, the data sources for the custom character come from the actual character, not the camera.
    Share this post

  2. #2

    Re: OPE "perspective" problem.

    ope a camera to the location of the enemy just place a static one if the enemy doesn't move(camera target your character, range 0.01, enabled)
    take the vector info rotations of the camera and put those in the ope(global) that rotates the enemy
    this should work always
    Share this post

  3. #3

    Re: OPE "perspective" problem.

    Interesting. By rotation vector, you mean angle xyz? Seems so much simpler! The camera never accidently activates this way?
    Share this post

  4. #4

    Re: OPE "perspective" problem.

    the object info vector(angle) or object info datascouces if you want that but the vectors one is shorter 1 vs 3 datasources
    camera can activate on accident if it enters the range

    and you might need to rotate your glue pivot so it has the same axis as your camera
    Share this post

  5. #5

    Re: OPE "perspective" problem.

    The way your character is facing should have no effect on your enemy's rotation.
    Are you sure you haven't switched around the operands on the ArcTan2 function?
    Share this post

  6. #6

    Re: OPE "perspective" problem.

    Im sure. The rotation still technically works with this method, like say for simplicity's sake the game character starts out facing north, walks up a hallway, and hits an area trigger, activating the enemy who is waiting on the sidelines, facing south. This is all good, the enemy rotates with his face toward the game character. But lets say I use the same code walking down a hallway facing west. The enemy still rotates toward the game character, but it is constantly facing the game charater with its side. (its "east" side")

    Anyway, the camera method seems to work great, depending the glue group of the enemy i have to adjust the angles given with two input operaters, but it seems to work flawlessly.
    Share this post

  7. #7

    Re: OPE "perspective" problem.

    Originally Posted by j0nnystr0ng
    Im sure. The rotation still technically works with this method, like say for simplicity's sake the game character starts out facing north, walks up a hallway, and hits an area trigger, activating the enemy who is waiting on the sidelines, facing south. This is all good, the enemy rotates with his face toward the game character. But lets say I use the same code walking down a hallway facing west. The enemy still rotates toward the game character, but it is constantly facing the game charater with its side. (its "east" side")

    Anyway, the camera method seems to work great, depending the glue group of the enemy i have to adjust the angles given with two input operaters, but it seems to work flawlessly.
    its better to place a glue pivot in the right direction and glue your enemy to that because 2 input operators can mess up if you use it to rotate more than 1 axis
    Share this post

  8. #8

    Re: OPE "perspective" problem.

    Have you checked "set rotation" in the OPE?
    Share this post