Help with endless runner, problems withs jumping and sinking platforms

envy87envy87 Member Posts: 13
edited November -1 in Working with GS (Mac)
Hey,
I'm having some trouble with the endless runner game i'm working on. I'm using moveable actors for the platforms, and recycling them off screen(not using interpolate). The main problem is whenever my hero jumps (using an accelerate not interpolate) on them, the platforms sink, even when the hero has zero density and platforms have a heavy density. Any one have any ideas for a workaround or solution ?

Comments

  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    Try constraining the y value?
  • patm1982patm1982 Member Posts: 50
    Ya I'm having a similar problem. constraining works for the Y axis. but I hate to constrain if its not needed, seems like there should be a setting with the physics.
  • dotsonj23dotsonj23 Member Posts: 316
    Here is a work around. I do know why you are using moveable actors and not interpolate because interpolate does not work with collission. But what you can do is create another invisible actor of the same size. Make it non-moveable and move it using interpolate. Then for the visible actor just constrain it's x and y to the invible actor but have all collission behavior associated with the visible actor. This way you can use interpolate to control movement but still get the advantage of collission without the platform moving upon collision. It adds extra actors and constrains but makes it so you can move he platform left and right and up and down without collission screwing it up.
  • dotsonj23dotsonj23 Member Posts: 316
    Also, if you don't like movement with interpolate you can make the invisible actor move using accelerate as long as you make it moveable. Just make sure that actor does not have any collision behaviors and you are not using the gravity behavior ( which you should not anyways because it sucks) . just make sure your visible actor has all the coission behaviors and is not moveable and is constrained to the invisible actor that is actually moving.
Sign In or Register to comment.