playMaker

Author Topic: smooth look at issue  (Read 1881 times)

everycolorfades

  • Playmaker Newbie
  • *
  • Posts: 20
smooth look at issue
« on: May 31, 2018, 12:32:32 PM »
I'm trying to use smooth look at to rotate the camera in a space sim. (So there shouldn't be any look limit.) The issue I'm running up against is that after rotating up for a bit the view just starts shaking and refuses to rotate any further.
I have the look at set to a child object set straight ahead of the cockpit and I also have a child object set above for the up vector values. Doesn't seem to make a difference whether or not the up vector is set, and of course keep vertical is unchecked.
Is this a glitch, or is this just not the correct action for this scenario?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: smooth look at issue
« Reply #1 on: May 31, 2018, 07:36:11 PM »
Hi.
The object you are looking at should not be a child of the camera.

Maybe you can have a empty object and have the 'camera' and the 'look at' as a child in there.

everycolorfades

  • Playmaker Newbie
  • *
  • Posts: 20
Re: smooth look at issue
« Reply #2 on: May 31, 2018, 08:56:32 PM »
Editing this post - there seems to be no change at all from looking at a child object vs non-child object. If I set an up vector I can switch from making the camera stop and jitter from reaching the vertical limit, to making the camera spin around in circles at the same rotation.

One more edit - I'm using some other rotation stuff instead so I guess I'm all set, but I'm assuming that smooth look at is somewhat bugged.
« Last Edit: May 31, 2018, 11:06:02 PM by everycolorfades »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: smooth look at issue
« Reply #3 on: June 01, 2018, 03:11:19 AM »
Hi,

 the smooth look at is likely fine, but you may have a race condition issue between your target and your look at source.

 what is the relation in the hierarchy between the object that looks at and the target it should look at?

 Bye,

 Jean

everycolorfades

  • Playmaker Newbie
  • *
  • Posts: 20
Re: smooth look at issue
« Reply #4 on: June 01, 2018, 09:46:04 AM »
Hi Jean,
I set up a test project to replicate the issue. The way it's set up with FMS's is:

Container [Get rotation of Main Camera, set that rotation to LookatParent]
    Cockpit [Smooth look at LookAt]
        Main Camera [Mouse Look]
    LookatParent (set at same position as cockpit)
        LookAt

So basically the cockpit is supposed to smoothly follow the camera rotation.
« Last Edit: June 01, 2018, 09:48:59 AM by everycolorfades »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: smooth look at issue
« Reply #5 on: July 18, 2018, 04:56:49 AM »
Hi,

 Did you get it working in the end?

 Bye,

 Jean