playMaker

Author Topic: iTween Movement  (Read 4239 times)

MrMitch

  • Full Member
  • ***
  • Posts: 131
    • Rage Quit Games - Coming Soon
iTween Movement
« on: August 14, 2012, 03:27:33 PM »
I have been experimenting with an idea, the idea is that there is a platform(cube) and it constantly moves upwards, i found that using 'iTween Move To' does work but it causes lag when player object(a sphere) is being pushed upwards with the platform, sometimes it even falls through.

So my question is how do i stop it from lagging or can some explain how i would achieve this without itween?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: iTween Movement
« Reply #1 on: August 15, 2012, 03:57:42 AM »
hi,

 is the platform movement fast? have you tried to control the platform by its transform instead?

bye,

 Jean

MrMitch

  • Full Member
  • ***
  • Posts: 131
    • Rage Quit Games - Coming Soon
Re: iTween Movement
« Reply #2 on: August 15, 2012, 04:03:34 AM »
Yes the movement is quite fast but it removes the challenge if i slow it down.

As for transform i did have a look into how to do it that way but couldn't figure it out, can you give me a brief or point me at an example?

It's moving upwards on the Y axis and its a 2D game just so you know.

Thanks.

markinjapan

  • Full Member
  • ***
  • Posts: 103
Re: iTween Movement
« Reply #3 on: August 15, 2012, 01:09:30 PM »
I got around a similar problem by parenting my character to the moving object whilst the character was on it (so use a trigger or raycast). That way your character is moving at the exactly same speed as the moving object and there's no fighting (I'm guessing you are using physics?).

If you are using physics, play around with the physics settings, especially the 'penetration' setting. I turned that to 0, default is 0.1 or something which causes physics objects to embed inside objects moving against them.


Yes the movement is quite fast but it removes the challenge if i slow it down.

As for transform i did have a look into how to do it that way but couldn't figure it out, can you give me a brief or point me at an example?

It's moving upwards on the Y axis and its a 2D game just so you know.

Thanks.

MrMitch

  • Full Member
  • ***
  • Posts: 131
    • Rage Quit Games - Coming Soon
Re: iTween Movement
« Reply #4 on: August 15, 2012, 02:19:21 PM »
For character movement i am using the 2D Platformer script provided in the examples you get from the unity3d website and the platform was made in 3dmax and all i've done with it is apply a box collider and move it with iTween.

I probably should have explained all of this in the first place.