Help jumping over a box...
LuMa Games
USAMember Posts: 129
My problem can be explained easier through a 10 second video. Take a look: http://www.mediafire.com/watch/c6lqcgzmlqnn2tj/Video_11-11-2014_9-04-21_PM.mp4
Comments
Help please
How are you moving your actor forward?
Rule
When Left is Down
When Right is Up
Change Main_Character's Linear Velocity X to -750
(I don't remember the exact speed, probably around 750)
@Luma
So I'm guessing your using a change attribute to set speed to -750 when you press left, and what will happen as soon as you hit the block that speed goes to 0 and want change back to -750 until you press left again.
Try using a move behavior instead because it will continue trying to move even when pushing against the block.
Try to constrain self.position.x to self.position.x - 3 ( for left movement ) and self.position.x to self.position.x + 3 (for right movement)
http://www.arcaderz.com
@BBEnk
Yes, I am using change attribute. The "Move" behavior doesn't work well when mixed with jumping so that isn't an option. (Basically if I were to jump and move left or right, I would fall significantly slower than usual)
This method does work, however 3 is too slow and if I were to change it to a higher number the movement is too jumpy. For example if I change it to 8 or so, that means my character is jumping over 8 pixels constantly and that prevents the movement from being smooth.
@jeezzcake
I played around with your idea a little bit and ended up getting it to work. I constrained the linear velocity to -750 instead of just changing it to -750 and that fixed the issue. Thanks for the help guys