Don't fly off on collide

FallacyStudiosFallacyStudios Member Posts: 970
edited December 2011 in Working with GS (Mac)
I'm making a game with the dpad and button controls. The way my character moves is as such. When he is walking forward everything else scrolls past as he stands still. If he walks back he moves everything else stays (he cant pass the end of the screen). When he walks forward after walking back he gets to middle of the screen and he stops moving again and everything scrolls. I have all of this working fine. (FYI I'm using Motion Linear Velocity on all movements for more control)

My issue is this. I placed an obstacle in his way. When he collides it stops everythings movement correctly for the time being but if I continue to press forward the object eventually rotates and him with it and he goes flying off in a direction. I want the object to be almost immovable, but it still needs to scroll as he walks as described above. He needs to be able to collide with it and neither him nor the scene (or obstacle) will move. When he jumps on it he can walk across the top like any other obstacle in a game. How can I stop this weird collision of rotating and flying off when the continuing forward into the object.

I hope I didn't confuse you to much. Any suggestions? Thanks

Comments

  • FallacyStudiosFallacyStudios Member Posts: 970
    edited December 2011
    In short when he collides with the object it works alright besides the fact that be bounces back some even though restitution is at 0 (which I need to solve) And when you continue walking forward at the obstacle the obstacle should not be able to move backwards (almost be immovable) and neither should start rotating if the forward contact is made to long.

    An if the two collide or overlap setting the object movable to false will not work because he needs to be able to walk on the top of it and it still scroll across as it should. And setting the Linear Velocity to 0 when they touch wont work either because it would have the same effect making the obstacle not scroll when it needs to.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    ive answered like 8 questions in the past 2 days about restitution not being set to 0

    would be nice if it was set to 0 as default :)
  • FallacyStudiosFallacyStudios Member Posts: 970
    @tshirtbooth No both of those actors have restitution at 0. Density is at 1 Friction at 3. Should either of those be changed?
  • FallacyStudiosFallacyStudios Member Posts: 970
    edited December 2011
    @tshirtbooth I sent it to you. Read the email if you need guidance while looking at it. Like I said fee free to use the template if you dont have something like it and like it. Thanks for looking at it. I cant figure out why its doing what it is.

    And feel free to ask more questions in here or email if you are confused about something.
Sign In or Register to comment.