Hello,
I have been using messing about in unreal engine now for a little over a month probably, and i feel i have came quite a long way. I have gotten to a point where i now feel like i am able to move forward with my own game, which i would love to do, but im having trouble with something that is essentially holding me back from progressing.
I figured my first attempt at a game should be a simple one, so i decided to go with a simple 3D marble style platformer as i assumed there would be plenty of documentation on the subject. Don’t get me wrong, there IS a lot of documentation out there for this, and i’m pretty sure at this point i have seen it all, which is why i’m here now.
The real issue is that i’m not satisfied with the control of the ball i have made. Technically speaking, there is nothing wrong with it… It can move left and right etc, and the camera can be controlled too, but it feels horrible despite having messed around with what seems like every value under the sun.
As someone who put a LOT of time into Marble blast gold/ultra back in the day, i don’t want to settle for horrible sluggish control. In fact, if possible, i would like to get as close to these games as possible. whilst looking through the game files for Marble blast gold on my quest to try and figure out how it controlled the marble, i came across this code:
datablock MarbleData(DefaultMarble){
shapeFile = "~/data/shapes/balls/ball-superball.dts";
emap = true;
renderFirstPerson = true;
// maxRollVelocity = 55;
// angularAcceleration = 120;
maxRollVelocity = 15;
angularAcceleration = 75;
brakingAcceleration = 30;
gravity = 20;
staticFriction = 1.1;
kineticFriction = 0.7;
bounceKineticFriction = 0.2;
maxDotSlide = 0.5;
bounceRestitution = 0.5;
jumpImpulse = 7.5;
maxForceRadius = 50;
bounce1 = Bounce1Sfx;
bounce2 = Bounce2Sfx;
bounce3 = Bounce3Sfx;
bounce4 = Bounce4Sfx;
rollHardSound = RollingHardSfx;
slipSound = SlippingSfx;
jumpSound = JumpSfx;
Now, after seeing this, its pretty clear that there is a lot more to the control of the marble on this game compared to the number of variables i have been using in my own. The only things i have been using are Friction, torque power, restitution and linear/angular damping.
I understand that these values don’t really say much, but i’m hoping someone here will be able to help me piece together a more robust movement blueprint for my marble. Something feels a lot more agile and that doesn’t take like half a year to slow down once it gets rolling etc. (i’m assuming that’s what the break acceleration is linked to in the mbg code)
Secondly, i have been having some issues on making my ball jump. i have been using a sphere trace to check when the ball is on the ground in order to allow the ball to jump, but it doesn’t seem accurate enough. I have a feeling that because of the fact that i’m shooting a trace down, sometimes the jump may activate before the ball has actually touched the ground, and because of that is taking into consideration the downward velocity, resulting in a low bounce and inconsistent jump height.
Thanks in advance for anyone who is reading this/is willing to help me out. i really do appreciate it.