Interpolate transfers no speed data (Moving Platform)

TyeronTyeron Member Posts: 13
edited November -1 in Working with GS (Mac)
So I have a moving platform that's using interpolate to move side to side. I also need this platform to push something else out of the way. I realize I can use a collider to tell if something has been moving but I need to know if the block being pushed by the platform has gained a certain speed before it can change.

I've tried constrain the block to the x position of the platform and it still shows no linear velocity.

Is there anyway to use interpolate (with moveable unchecked) and have something pushed or constrained to it's X and show that other actor/block as gaining an X Velocity.

The block does work and I can push it out of the way with my player character. Using display text I can see that it is gaining a linear velocity this way but this will impractical with the puzzles in mind.

Any help would be much appreciated.

Comments

  • DizkoDizko Member Posts: 498
    I think the answer is no, you can't use interpolate that way.

    From what I've seen, interpolate in combination with collide only will move the object (if movable) it's hitting when interpolating, as soon as it stops moving, the object it's pushing also stops. By normal logic the velocity of the pushing should make the object being pushed keep going, but it doesn't. I just stops dead.

    I ended up having to play with the physics and replacing interpolate with change linear velocity behavior and making the platform movable.

    Interpolate is just filling gaps between point a and point be within the certain allotted time. Nothing else is involve, no physics or anything. If you want to involve velocity and have it applied to other objects, you have to dump interpolate.
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    keep in mind that speed is just distance/time. So you could have a system that uses a timer to change change time1 and time2 and distance1 and distance2 and then at the end of interpolation just change linearvelocityX to (dist2-dist1)/(time2-time1).

    For details look up FMG's throwing flick demo - it uses this method to calculate how hard you throw an object based on how fast you drag it before releasing it.
  • TyeronTyeron Member Posts: 13
    Well my issue is that when I ditch interpolate my player slides on top of the moving platform or warps through or off. Is there something to keep the player on top of the platform while allowing the player to move about on top without having the platform sliding out from under them?

    I'm looking to make these assets so I can drop them in anywhere and they don't need barriers or waypoints to know where to start or end. ...

    well as I'm saying this I think I might have an idea.. but if you have some suggestions I'm all ears.

    Thanks much!
Sign In or Register to comment.