Hi Guys,
This forum is great and it has helped me several times to read the posts here.
Now to me issues with a platformer.
1: I have implemented graphics using Actor, and everything is fine until I comment the standard debug draw. Then, everything becomes laggy. I've looked around the forum and I've seen that other have had the same problem, but I haven't solved it. Any ideas?
2: I've been using this techique when creating the terrain: http://www.box2d.org/forum/viewtopic.php?f=8&t=1437&hilit=terrain . But when I make the character jump, it doesn't jump straight up (as I want it to), it jumps forward if the character is standing on sloping terrain. This is my "jump-code":
3: How can I apply a constant force if I want the character moving forward? For the moment it slows down after a while:
Thanks in advance! 🙂
This forum is great and it has helped me several times to read the posts here.
Now to me issues with a platformer.
1: I have implemented graphics using Actor, and everything is fine until I comment the standard debug draw. Then, everything becomes laggy. I've looked around the forum and I've seen that other have had the same problem, but I haven't solved it. Any ideas?
2: I've been using this techique when creating the terrain: http://www.box2d.org/forum/viewtopic.php?f=8&t=1437&hilit=terrain . But when I make the character jump, it doesn't jump straight up (as I want it to), it jumps forward if the character is standing on sloping terrain. This is my "jump-code":
Code:
characterBody.ApplyImpulse(new b2Vec2(0,35), characterBody.GetWorldCenter())
3: How can I apply a constant force if I want the character moving forward? For the moment it slows down after a while:
Code:
characterBody.ApplyImpulse(new b2Vec2(1,0), characterBody.GetWorldCenter())
Thanks in advance! 🙂