Esempio n. 1
0
        void InputJump()
        {
            if (!controlsEnabled || isInWater)
            {
                return;
            }

            if (Raycast.CastVoxel(currentWorld.WorldCamera.Position, new Vector3(0, -1, 0), 2.1f, out RayVoxelOut output))
            {
                rigidbody.AddImpluse(new Vector3(0, 1, 0) * 600);
            }
        }
Esempio n. 2
0
 public override void Begin()
 {
     rigidbody = new Rigidbody(this, 5, new BoundingBox(-0.125f, 0.125f, -0.125f, 0.125f, -0.125f, 0.125f));
     rigidbody.AddImpluse(new Vector3(0, 30, 0));
     base.Begin();
 }