Discgolf game and rotating the player to face the basket

Hi all

I´m making a discgolf game and I have major problems about rotating the player to face the basket after a throw.

I pan the player and tilt the disc with the mouse. When I throw the disc it lands on the ground and then I want the player to face the basket. I use “Lookat(basket)” in my code for this and I use some stripped mouselook code to pan the player. The problem is that the player object allways returns to the original y value…

I really don´know how to do this and would be very greatful if someone could help me or tell me how to do this in a proper way.

2943436--217881--upload_2017-2-1_17-27-39.png

I have attached the script used on the frisbee object

Thanks
/Anders

2943436–217880–LaunchFrisbee.cs (14.3 KB)

Oh! Here is a webdemo to dhow you what I mean…

http://angu.ddns.net/FB/index.html

/Anders

I solved it. Made another script with pan and tilt.
Remove this new script in runtime and then I moved the player to the new landing spot.
Add the “pan and tilt” script and set the pan eulerangle.y same as the player. Voila!

/Anders