Playmaker Forum

PlayMaker News => General Discussion => Topic started by: Kothe on April 24, 2014, 04:06:57 PM

Title: SentryGun Two Smooth Look at Axis
Post by: Kothe on April 24, 2014, 04:06:57 PM
Hi.
I´m trying to set to a compounded SentryGun. Im doing it with Smooth Look at.
The movement for the Y axis object works fine, but I need the X axis to the other object to follow "up and down" the character.
I have modeled it with all the posibles axis orientations, and setting diferents
up vectors.

  How can I achive it ?
Title: Re: SentryGun Two Smooth Look at Axis
Post by: Dev_Sebas on April 24, 2014, 06:01:23 PM
Hello
So you can get the Y axis correctly.
The X axis...not yet.

Take this action, and check BlockY.
This will help. But not yet done.
The gun won´t rotate on Y axis because my action is blocking it.
I´m not yet able to make this correctly.
I´m currently trying to make a sentry gun movement too.
So if I can do something more I will post it.
Title: Re: SentryGun Two Smooth Look at Axis
Post by: Kothe on April 24, 2014, 06:24:43 PM
Thank you very much.

 I´m trying another way for the X axis, not with Look At. but ....no yet.

 Rotate, some maths.... :S
Title: Re: SentryGun Two Smooth Look at Axis
Post by: Dev_Sebas on April 24, 2014, 08:57:45 PM
Just made it!!! :) ;D
Forget my action.
Tomorrow will try to explain.
Soo happy!
Cheers
Title: Re: SentryGun Two Smooth Look at Axis
Post by: Kothe on April 25, 2014, 06:34:06 AM
Take a look.

Maybe I´m wrong , but with pen and paper seems to work.
Title: Re: SentryGun Two Smooth Look at Axis
Post by: Kothe on April 25, 2014, 12:16:38 PM
Yes.
 This link.  https://hutonggames.fogbugz.com/default.asp?W971

 I have test it, it works when the character moves fordward and backward, the sentry aims the head .... but not when it moves Up and down..... :(  :S   

 What I missing ?
Title: Re: SentryGun Two Smooth Look at Axis
Post by: Dev_Sebas on April 25, 2014, 04:49:44 PM
1-You will need to have quaternion actions. Get them here https://hutonggames.fogbugz.com/default.asp?W967 (https://hutonggames.fogbugz.com/default.asp?W967).
2-Import this custom package.


We need to use quaternions because they have more power than simple rotations.
"Basically" it´s this.
Cheers
Title: Re: SentryGun Two Smooth Look at Axis
Post by: Kothe on April 25, 2014, 05:15:11 PM
                                               :)

                                             THX