Solid Rotation Platform

BackUpAndDownBackUpAndDown Member Posts: 685
edited November -1 in Working with GS (Mac)
When I have "Movable" checked the platform slides away when my actor collides with it. When I have it unchecked it won't rotate...

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    Have movable checked and change the restitution to 0
  • PhoticsPhotics Member Posts: 4,172
    You could try making the platform rotate with Interpolate and disable movable on the platform... maybe that will work for your project.
  • BackUpAndDownBackUpAndDown Member Posts: 685
    JohnPapiomitis said:
    Have movable checked and change the restitution to 0

    Hmm... still won't stay still. Does it matter what the density and friction is set to?
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    is the restition 0 on the player too?
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    and if that doesnt work try constraing position x to zero. Try the first way first
  • BackUpAndDownBackUpAndDown Member Posts: 685
    Photics said:
    You could try making the platform rotate with Interpolate and disable movable on the platform... maybe that will work for your project.

    I still haven't figured out how to use Interpolate. =P Could you give me an example of what the interpolate attribute and duration should be set to?
  • GamersRejoiceGamersRejoice Member Posts: 817
    You may need to constrain the rotating object to a specific point.
  • BackUpAndDownBackUpAndDown Member Posts: 685
    JohnPapiomitis said:
    is the restition 0 on the player too?

    Yeah
    JohnPapiomitis said:
    and if that doesnt work try constraing position x to zero. Try the first way first

    If it's set to 0 it moves the platform to the far left of the stage...
  • PhoticsPhotics Member Posts: 4,172
    BackUpAndDown said:
    I still haven't figured out how to use Interpolate. =P Could you give me an example of what the interpolate attribute and duration should be set to?

    Do you have a copy of my book? I think that does a good job of explaining how to use Interpolate.

    Here's a short explanation for what I think you're trying to create with this example...

    ———————
    |XXXXXXXXXX|
    |XXXXXXXXXX| <--- platform
    ———————

    The rotation angle is initially 0°

    If you want it to rotate you can use Interpolate behavior.
    EVEN THOUGH THE PLATFORM ACTOR NOT SET TO MOVABLE

    self.rotation to 45°

    Then... you can use rules to make it rock back and forth...

    If self.rotation = 45°
    then interpolate to 0°

    If self.rotation = 0°
    then interpolate to 45°

    The platform will move without physics enabled. It won't matter, because the main actor should have physics and it should detect the collision.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    BackUpAndDown said:
    Yeah

    If it's set to 0 it moves the platform to the far left of the stage...

    sorry i didnt mean zero, click on the actor and see what the x position is for where u placed it, and constrain to that numgber, not 0
  • BackUpAndDownBackUpAndDown Member Posts: 685
    Photics said:
    Do you have a copy of my book? I think that does a good job of explaining how to use Interpolate.

    Here's a short explanation for what I think you're trying to create with this example...

    ———————
    |XXXXXXXXXX|
    |XXXXXXXXXX| <--- platform
    ———————

    The rotation angle is initially 0°

    If you want it to rotate you can use Interpolate behavior.
    EVEN THOUGH THE PLATFORM ACTOR NOT SET TO MOVABLE

    self.rotation to 45°

    Then... you can use rules to make it rock back and forth...

    If self.rotation = 45°
    then interpolate to 0°

    If self.rotation = 0°
    then interpolate to 45°

    The platform will move without physics enabled. It won't matter, because the main actor should have physics and it should detect the collision.

    Ah, okay that makes more sense. Now I just need to figure out how to make it react to the players position and not just rock back and forth.
  • BackUpAndDownBackUpAndDown Member Posts: 685
    tshirtbooth said:
    Are you talking something like this

    http://gamesalad.com/game/3269

    lol Exactly like that, Thanks. I just have to figure out why you have an Accelerate up behaviour on the platform and what makes it rotate. =P
  • BackUpAndDownBackUpAndDown Member Posts: 685
    tshirtbooth said:
    thats because there is gravity on the scene so the accel up is to counter that. if you dont use gravity dont accel up

    :)

    Ah, thanks. =P

    Two last questions.
    Why dose my character "sink" into the platform?
    and is there a way I can slow down how quickly it rotates?
  • BackUpAndDownBackUpAndDown Member Posts: 685
    tshirtbooth said:
    if your player is sinking that means you are using gravity. That is not going to work for you. you will need to use no gravity and then put accelerate down on everything you want to have gravity.

    It would help so much to see what your doing to help better.

    Hmm... I wasn't using gravity. I was already using Accelerate down.

    Heres a demo of what i'm working on. http://gamesalad.com/game/6457?GSCVersion=0.9.0&tokenUsername=BackUpAndDown&token=192a948359dfdf5c35ec782bed2864718b1aef7a3cf1fbd0641eb60d1884588d

    If you stay standing on the platform the player will sink into it. I also want to the platform to not be so "spiny". I want it to have a bit of drag.
  • BackUpAndDownBackUpAndDown Member Posts: 685
    Am I the only one who can't see the "download" button that use to be next to the web games?
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    if u wanna take your player graphic off and make it downloadable ill fix it for you. Its kinda hard without seeing it in front of me
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    no its not there so scratch the above comment lol
  • BackUpAndDownBackUpAndDown Member Posts: 685
    If anyone wants to take a shot at fixing my problem just email me at: contactupanddown@gmail.com I'll send you a demo of what i'm talking about.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    email sent
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    Just checked it out. All you do to slow down the rotation platform is change the density. Change it to 30 and go from there. And the reason for the character sinking in the platform is because you have the gravity as acceleration, so even when its on the platform and colliding the accelerate is still overriding. To fix have a atrribute to check when the player is on platform to temporarily disable gravity. But as soon as your not touching it the gravitys back so you cant notice. That fixes it, i just checked.

    Hope i helped
  • BackUpAndDownBackUpAndDown Member Posts: 685
    JohnPapiomitis said:
    Just checked it out. All you do to slow down the rotation platform is change the density. Change it to 30 and go from there. And the reason for the character sinking in the platform is because you have the gravity as acceleration, so even when its on the platform and colliding the accelerate is still overriding. To fix have a atrribute to check when the player is on platform to temporarily disable gravity. But as soon as your not touching it the gravitys back so you cant notice. That fixes it, i just checked.

    Hope i helped

    Awesome, that solved both my problems perfectly. ^_^ (but once I removed the acc down I only had to set the density to 4.) Thanks for taking the time to help.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    Anytime :)
Sign In or Register to comment.