Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: frteae on August 07, 2016, 06:56:44 AM

Title: Moving an object with iTween, rotate/move towards or rotate/move object?[SOLVED
Post by: frteae on August 07, 2016, 06:56:44 AM
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 !

Title: Re: Moving an object with iTween, rotate/move towards or rotate/move object?
Post by: kavery on August 08, 2016, 08:49:39 AM
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.
Title: Re: Moving an object with iTween, rotate/move towards or rotate/move object?
Post by: frteae on August 09, 2016, 07:22:51 AM
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 !
Title: Re: Moving an object with iTween, rotate/move towards or rotate/move object?
Post by: frteae on August 14, 2016, 04:51:53 AM
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.