Cool! I'm guessing that setWorldPosition just needs to place the party a sliver above ground-level so the engine thinks they're falling? Also, the move while falling upwards thing is kinda weird - certainly it could be used for puzzles, but it seems like it's going to be very counter-intuitive to the player, so maybe using onMove to intercept movement commands during a jump would be a good idea.minmay wrote:There's no horizontal gravity.
Sure: just use setWorldPosition to place the party somewhere off the ground, then use "party.gravity:setFallingSpeed(velocity)" where velocity is the downward velocity you want the party to have. You can also use "party.gravity:disable()" to make them stop in midair and hover there, but it will be reactivated as soon as the party moves or turns with the keyboard (turning with mouselook, however, doesn't re-enable gravity). Note that the party can freely turn and move while "falling" upwards, but not downwards.nichg wrote:This gave me an awesome idea. If we figure out how to mess with the party's gravity-based movement, can we create something where the party is actually flung upwards (e.g. maybe they have to bounce up into a teleporter at a higher elevation)?
I was able to jump over the Forgotten River by typing this in the debug console:though I took a lot of damage when I hit the ground.Code: Select all
party:setWorldPosition(55.5,0.1,70.5,0) party.gravity:setFallingSpeed(-50)
For horizontal motion, you could just have a timer that updates the party's in-plane position using setWorldPosition so long as 'isFalling' is true, and keep an eye out for when the party crosses a cell boundary. Alternately, maybe you can use Knockback? Might be more trouble than it's worth, though.