How should I create the main character for a platformer game using Fisica library?
in
Contributed Library Questions
•
1 year ago
I'm starting to make a side scrolling platformer and I was just wondering if anyone had any ideas about how to make the main character control better.
What I have so far:
- class Player extends FBox{
- PImage b = loadImage("alen.gif");
- Player(int x, int y){
- super(64,128); //The image is 64x128
- setPosition(x, y);
- attachImage(b);
- setFriction(1);
- setRotatable(false);
- setRestitution(0);
- }
- }
What I would like:
The character to not slide when you stop moving/no acceleration or any other things you think would make him control better. I definitely need to change it so that if you hold the space bar longer he jumps more, but that I can figure out.
Thanks!
(Every comment is very much appreciated and I will do my best to give back to the community that has answered so many of my questions! Thanks!!!)
1