playMaker

Author Topic: Object moves to undesired location. [SOLVED]  (Read 2514 times)

ryf9059

  • Full Member
  • ***
  • Posts: 100
Object moves to undesired location. [SOLVED]
« on: March 17, 2014, 11:41:42 AM »
I have an object in 3D space and at the start I use iTween Move To action to move the object to vector (-2,0,0). That says, it should move to horizontal left. But the fact is that it moves left and up at the same time, going for a around 30 degree incline to the top while moving to the left. I have no extra actions here. Something I did wrong?

I also tried to use Move Towards, it also moves to a wrong location, although a bit different from the first wrong location. I have uploaded a screenshot where you can see my global vector value and the while arrow indicate where the object is going to move to.



What is causing this issue? Thanks
« Last Edit: March 17, 2014, 11:18:48 PM by ryf9059 »

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Object moves to undesired location.
« Reply #1 on: March 17, 2014, 12:16:03 PM »
Check the object's actual position to confirm it is actually at 0 on the Y axis and make sure you're in the correct pivot mode while looking at the scene view with it selected.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

ryf9059

  • Full Member
  • ***
  • Posts: 100
Re: Object moves to undesired location.
« Reply #2 on: March 17, 2014, 12:44:54 PM »
Check the object's actual position to confirm it is actually at 0 on the Y axis and make sure you're in the correct pivot mode while looking at the scene view with it selected.

Yeah I just noticed it's not actually at 0 so it moves upwards... but that's for Moving Towards where you can only use absolute coordinates. What about iTweens Move To? I chose self or world they both give me the same result.

I just want the object to move towards the left relative to itself. I thought I could to this by using iTweens Move to and use self space. But that is not working as intended.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Object moves to undesired location.
« Reply #3 on: March 17, 2014, 12:55:08 PM »
Use the iTween Move By action instead.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

ryf9059

  • Full Member
  • ***
  • Posts: 100
Re: Object moves to undesired location.
« Reply #4 on: March 17, 2014, 01:08:55 PM »
Use the iTween Move By action instead.

Thanks it worked! Just wondering what differences does it make by self space and world space in the iTween Move To action? They all look the same to me when I run them separately.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Object moves to undesired location.
« Reply #5 on: March 17, 2014, 01:10:50 PM »
Great!

I'm not sure what the difference is on that particular action, I would have to go in a tinker with them to see what happens.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D