playMaker

Author Topic: Moving an object with iTween, rotate/move towards or rotate/move object?[SOLVED  (Read 1415 times)

frteae

  • Playmaker Newbie
  • *
  • Posts: 9
    • View Profile
Hello,

This sounds simple, but I've tried with I Tweens, rotate/move towards, object, lerp etc.. None of these work for me so I think I'm doing it wrong.

Everything I tried results in either no movement, or the movement continuing without stopping when it reaches the target position.

Scenario:
I'm trying to move an object from current location to specific location.

(For example, when the player is holding a key in their hand and collides with the door, this key will animate/move itself to the keyhole and rotate).

So the final position is fixed, and the start position may vary, depending on where the player collides from.

Can you suggest, or point me to an example of which actions I should use for this? I don't think it should be that hard... Maybe I'm just missing something.

Thanks !

« Last Edit: March 12, 2017, 10:54:40 PM by jeanfabre »

kavery

  • Full Member
  • ***
  • Posts: 123
    • View Profile
I suspect it could be a matter of choosing local or global for your movements? 'Move to' should work for this.. make sure you have a location or object set that you move to. A picture of your setup would help.

frteae

  • Playmaker Newbie
  • *
  • Posts: 9
    • View Profile
I don't think that's it, I did test that..But I may have missed something. Away for a few days now, but I'll try it again when I get home and let you know !

frteae

  • Playmaker Newbie
  • *
  • Posts: 9
    • View Profile
Ok the problem is that my gravity affected, non-kinematic object was hitting another rigidbody during the movement. On impact, it kind of threw the whole movement out of whack and made my object fly around and not stop even at the final location.

Setting it to non-gravity + isKinematic right before the Tweening works for what I want to achieve.