playMaker

Author Topic: Problem with Looking at Target  (Read 2255 times)

ToxicFrog

  • Beta Group
  • Full Member
  • *
  • Posts: 139
Problem with Looking at Target
« on: April 16, 2015, 11:52:57 AM »
Hello friends,

I am having problems getting my player character to look at targets.

Here's the setup:
The player is in a vehicle. The camera (controlled by mouselook) is a child of the vehicle.
When the player targets an object by looking at it, I store the object as 'GrappleSphereActive' global variable, and send a Global Event called 'TargetConfirmed'.

The vehicle gets the 'TargetConfirmed' event (I see it happen), and the Smooth Look At Direction action is triggered. But, the vehicle is not pointing toward the target.

I've attached a screenshot of my setup. I appreciate any help, and will reply with results!

Thanks

ToxicFrog

  • Beta Group
  • Full Member
  • *
  • Posts: 139
Re: Problem with Looking at Target
« Reply #1 on: April 16, 2015, 12:12:23 PM »
I just realized I was not using the Owner for LookAt. I've fixed it, but the vehicle still is not looking at the target as expected.

I've attached a screenshot of the setup.

Thanks!

ToxicFrog

  • Beta Group
  • Full Member
  • *
  • Posts: 139
Re: Problem with Looking at Target
« Reply #2 on: April 16, 2015, 12:25:44 PM »
Edit:
I thought I'd solved it, but I haven't. Adjusting the vehicles's RigidBody drag seemed to help, but now it's behaving just as before (not looking at the target position).

I'd appreciate any help - thanks!
« Last Edit: April 16, 2015, 12:35:28 PM by ToxicFrog »

ToxicFrog

  • Beta Group
  • Full Member
  • *
  • Posts: 139
Re: Problem with Looking at Target
« Reply #3 on: April 16, 2015, 01:27:15 PM »
Note:
The vehicle seems to be turning slightly toward the target position, but it just will not face directly at the target.

I am sure I'm missing something simple - I appreciate any help!

Edit:
It looks like the first time I look at the target position, it works as expected. But after each time I Look At a new target, it never aligns properly.

Is this some sort of gimbal / euler problem?
« Last Edit: April 16, 2015, 01:33:23 PM by ToxicFrog »