1) Jumping is now a constant height.
- This was accomplished by scrapping the PhysX bounce system and rewriting my own to suit the needs of the game, so that if you are jumping, no bounce is applied to the marble and you simply add the jump force. This is not the case with jumping up/down ramps, as there are many other factors that play into the trajectory of the marble. (You also don't jump if you hit the ground with enough force, you simply bounce to the height you would have normally)
Lines of code to achieve this: 51
2) Wall hits now work.
- This feature was a much more difficult one to implement and likely needs a bit of tweaking for MBG replication, however it works very much like you would expect. The reason this was difficult, as the effect has no basis in Physics, and is actually the opposite of what would really happen if a spinning ball hit a wall. Because the marble is rotating downward against the wall, the marble should bounce off lower than the collision normal angle. Wall hits make the marble go higher... <- Sometimes I just don't double check my facts... Don.Gato to the rescue!
The effect was achieved by calculating the surface normal of the geometry hit (to make sure it is really a wall and not just a steep ramp) and then adding y velocity relative to the impact force, resulting in a higher bounce the harder you hit the wall. There is also additional code to make sure that you aren't wall hitting if you don't have a certain threshold of y-velocity (ie, you didn't jump against the wall, you just ran into it or fell into it while going down).
Lines of Code: 36 (75% is math that looks like this...)
Code:var baryCenter = hitpt.barycentricCoordinate;
    var interpolatedNormal = n0 * baryCenter.x + n1 * baryCenter.y + n2 * baryCenter.z;
    interpolatedNormal.Normalize();
    interpolatedNormal = hitpt.transform.TransformDirection(interpolatedNormal);
The final bug that I need to work out is loosing the ability to jump (until you leave the ground via dropping off a small ledge or using blast) if you jump while pressed against a wall. This occurs because the map is all a single piece of geometry, so while you are leaving the floor, you aren't exiting the collision (because you are still touching the wall) and jump is re-enabled when you enter collision (which you can't re-enter because you never left). Once I think of a good solution to this, I'll fix it too. Until then, see if you can do some tricks with wall hits
Check out my website: alvios.com/ !