How to create a platform that is movable (and not!)

CapCap Member Posts: 225
edited November -1 in Working with GS (Mac)
Hi,

imagine you have an actor that is jumping on a platform. You don't want this platform to fall down because of the actor jumping on it. So you would deactivate the movable attribute for the platform actor.
But on the other hand you want the platform to rotate slightly, so the movable attribute needs to be set.

a, How to prevent the platform from falling down when another actor is jumping on it?
(my only idea was to decrease the density of the jumping actor and increase the density of the platform actor)

b, If the platform actor rotates, the actor standing on it is jumping when he stands on the left or right side (probably because of the density difference of both actors). I want this actor to slide down the platform if the platform rotates, this works. But I don't want him to jump. (I already set the Restitution of both actors to zero).
How to do that?

Any ideas? Thanks in advance for helpful comments.

Comments

  • VmlwebVmlweb Member Posts: 427
    I think the movable attribute can stay unchecked and also uncheck the fixed rotation attribute.
  • firemaplegamesfiremaplegames Member Posts: 3,211
    Yes, if you want the actor to move at all, even to rotate, you must have Movable checked.

    You need to constrain the X and Y of the platform to the platform's original position. Create two attributes in the platform, origX and origY. Set those to Position.X and Position.Y

    BTW, that is also how you would create a stationary propeller or windmill...

    Different densities are a good way to control the player vs. the platform.

    As far as not being able to jump, you'll need to check things like angular velocity, rotation, - things like that in the platform. If they are not at acceptable values, don't let the player jump.
  • CapCap Member Posts: 225
    Thanks for your answers!

    Here you got me wrong:
    firemaplegames said:
    As far as not being able to jump, you'll need to check things like angular velocity, rotation, - things like that in the platform. If they are not at acceptable values, don't let the player jump.

    I don't want the player actor to jump, I don't even have a jump rule in the game project. It's just so when the player actor is on the rotating platform, let's say he is on the left, and the platform is fastly rotating clock-wise, the player actor is automatically jumpiing away (physics). If the platform is rotating slowly, the player actor is sliding down on the platform. This is the way I want it. I just want the actor to slide, but not to jump away. I tried it with different densities, but this doesn't seem to be the solution. :-/
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    Try increasing gravity. or the 270 acceleration you have in the player.
  • CapCap Member Posts: 225
    Yeah, I replaced the acceleration behaviour with a constant move (down) behaviour. At least this way the player actor doesn't jump anymore when the platform actor rotates.
    It's not really good, but it's working.
  • firemaplegamesfiremaplegames Member Posts: 3,211
    I see. Yeah, that's a tough one.

    You're just going to have to monkey with it until you get something you like.

    You can try friction, drag, those types of things...
  • CapCap Member Posts: 225
    Yeah, thank you. This isn't a serious project, just an idea. So I'll just try out some things and see what I get. Thanks again.
  • ORBZORBZ Member Posts: 1,304
    reduce the restitution to 0 on both the actor and the platform and he will no longer "bounce"
Sign In or Register to comment.