Don't fly off on collide
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
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
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.
would be nice if it was set to 0 as default
And feel free to ask more questions in here or email if you are confused about something.