lol idk #1

Open
Quaternions wants to merge 828 commits from StrafesNET/strafe-project:master into master
Showing only changes of commit 7d1058164b - Show all commits

View File

@ -50,7 +50,7 @@ pub enum JumpCalculation{
pub enum JumpImpulse{ pub enum JumpImpulse{
FromTime(Time),//jump time is invariant across mass and gravity changes FromTime(Time),//jump time is invariant across mass and gravity changes
FromHeight(Planar64),//jump height is invariant across mass and gravity changes FromHeight(Planar64),//jump height is invariant across mass and gravity changes
FromDeltaV(Planar64),//jump velocity is invariant across mass and gravity changes FromLinear(Planar64),//jump velocity is invariant across mass and gravity changes
FromEnergy(Planar64),// :) FromEnergy(Planar64),// :)
} }
//Jumping acts on dot(walks_state.normal,body.velocity) //Jumping acts on dot(walks_state.normal,body.velocity)
@ -66,7 +66,7 @@ impl JumpImpulse{
match self{ match self{
&JumpImpulse::FromTime(time)=>gravity.length()*(time/2), &JumpImpulse::FromTime(time)=>gravity.length()*(time/2),
&JumpImpulse::FromHeight(height)=>(gravity.length()*height*2).sqrt(), &JumpImpulse::FromHeight(height)=>(gravity.length()*height*2).sqrt(),
&JumpImpulse::FromDeltaV(deltav)=>deltav, &JumpImpulse::FromLinear(deltav)=>deltav,
&JumpImpulse::FromEnergy(energy)=>(energy*2/mass).sqrt(), &JumpImpulse::FromEnergy(energy)=>(energy*2/mass).sqrt(),
} }
} }