playMaker

Author Topic: iTween + Orbit Cam  (Read 2156 times)

thefonz

  • Playmaker Newbie
  • *
  • Posts: 24
  • Augmentititus
iTween + Orbit Cam
« on: October 05, 2015, 11:11:04 AM »
Hi everyone

so im working on a scene and im slightly baffled about how to get around this.

Simple scene e.g.

ground plane, cube sitting ontop and a camera.
3 gui buttons at header.

when you click button 1, the camera moves to a point. Button 2, cam moves to a point etc...

the issue is. when using the mouse orbit script on the camera it constrains the cameras position, so whenever you click a button the cameras position will always start from its starting position rather than its last position.

not sure if im making sense...anyways would be awesome if someone could weigh in on this.

Thanks

Ahmed

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: iTween + Orbit Cam
« Reply #1 on: October 05, 2015, 12:43:23 PM »
Hi,
try getting the current camera position and use that as starting point for the tween.

btw you might wanna use DOTween instead

thefonz

  • Playmaker Newbie
  • *
  • Posts: 24
  • Augmentititus
Re: iTween + Orbit Cam
« Reply #2 on: October 05, 2015, 12:45:34 PM »
Thanks djaydino,

Lets say i get the cameras last position, do you know where i reference the data? im using iTween MoveTo.

also, ill give DOTween a go this week.

Thanks

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: iTween + Orbit Cam
« Reply #3 on: October 05, 2015, 01:56:01 PM »
Hi,
Sorry, i did not read you question properly ( tired from work i guess :) )
the script is probably

i have not worked yet wit a mouse orbit script but
maybe you can try disabling the script when tweening and enable again when done?

To try this Drag the script (on your camera) into a state before the tween and click set property,
then select the enabled property


if that does not work can you attach a sample scene or the mouse orbit script?

thefonz

  • Playmaker Newbie
  • *
  • Posts: 24
  • Augmentititus
Re: iTween + Orbit Cam
« Reply #4 on: October 06, 2015, 06:58:53 AM »
hey

tried this method out today and it works a treat :)

so basically it fires the script in between every tween state. which kinda gives nice functionality, so you cannot spin around the model once its stopped at its destination.

thanks a bunch djaydino much appreciated! bit annoyed a i didnt figure that out myself but hey ive been working till 4am past few days so i forgive myself haha.


djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: iTween + Orbit Cam
« Reply #5 on: October 06, 2015, 11:55:47 AM »
Hi,
I am happy it worked, i was not sure if it would :D