Game Development Community

Hugging the Ground - altering Torque gravity

by Quest Johnny · in Torque Game Engine · 01/06/2007 (12:13 pm) · 0 replies

I'm trying to make a game where a little character runs around mazes, up and down stairs and so on very rapidly, and where when you take your finger off the key, he stops. The standard way Torque / Tribes2 gravity works doesn't really fit with the gameplay I'm looking for.

I've consulted www.garagegames.com/mg/forums/result.thread.php?qt=14674 and the mGravityMod, and even simpler is to add a Physical Zone to add Applied Force or Gravity, but I feel like I am fighting the engine, so I wonder if I'm doing this right. I'll explain:

The character runs along terrain at a max of about 20, which is peppy enough to suit the feel I'm looking for. In standard Torque, when he comes to a tiny step in the terrain, he bounces up like a balloon and falls back down to earth in about 2 seconds. When he walks down stairs, he flies off the top step and lands about 10-20 feet beyond the bottom stair. What I want is for him to walk down the stairs as stairs, and not to bounce if he meets a step in the terrain, but just step up on it.

First, I tried altering the players' Mass and RunForce to ridiculously high values, but by the time the player was behaving in a way I was looking for, he was 90-300 kg and the runForce was so high that when I later came to try and do a jump, you couldn't apply enough force to the little guy to make him leave the ground without breaking the engine.

Second, I was going to do the mGravityMod above, but I discovered Physical Zones on the WIKI (in the Player Movement page) and thought they were an easy way to try. I tried altering the gravity in the zone to 30, or 50, or 100 which seemed better, but then the gravity is so high that it literally crushes the chr standing still (red damage flare, and death.) Applied force was similar, -10000 of force and he started to hug the stairs, but then odd bugs crept in as he walked up stairs.. sometimes he couldn't clear the top step.

So I am left with the feeling that I am going about this entirely the wrong way, because I'm having to enter values so huge and exaggerated they are confusing and breaking the engine. There must be an easier way to alter the way players move and interact with their surroundings. The Torque style skiing and lunar sailing around is very cool for Torque, but we can't be locked into only having players move that way, surely.

So I'm looking for a way to change the movement behaviour without having to push the values into these huge numbers that are obviously wandering into untested and buggy behaviour.