If player is not holding the ladder then it should not jump twice

I am using Unity2d and I am stuck with a problem. In my game I gave the player a double jump ability. I want to the player to jump twice only if they hold the ladder.

The problem is that if the player jumps through the ladder without holding the ladder, it jumps twice (as if the user presses jump key twice) I want the player to only double if player holding the ladder and then presses jump. If the player just jumps through the ladder it should not jump twice.

Below is the player script:

[SerializeField]  [SerializeField] float _xSpeed = 1f; [SerializeField] float _ySpeed = 1f; [SerializeField] float _jumpForce = 1f; [SerializeField] float _distance; [SerializeField] LayerMask _ladderLayer; private float _horizontalMovement; private float _verticalMovement; private Rigidbody2D _rb; private bool _isClimbing; private bool _isMovingHorizontal = true;    [SerializeField] Transform _groundPos; [SerializeField] float _checkRadius; [SerializeField] LayerMask _groundLayer; private bool _isGrounded;    // ExtraJump private int _extraJumps; [SerializeField] int _extraJumpValue = 1;   void Start() {     _rb = GetComponent<Rigidbody2D>();     _extraJumps = _extraJumpValue;  }   void Update() {     _horizontalMovement = Input.GetAxis("Horizontal");     _verticalMovement = Input.GetAxis("Vertical");        }   void FixedUpdate() {     if(_isMovingHorizontal)     {         _rb.velocity = new Vector2( _horizontalMovement * _xSpeed,_rb.velocity.y);     }            _isGrounded = Physics2D.OverlapCircle(_groundPos.position,_checkRadius,_groundLayer);       if(_isGrounded == true)     {         _extraJumps = _extraJumpValue;              }     if(Input.GetKeyDown(KeyCode.Space) && _extraJumps > 0)     {         _rb.velocity = new Vector2(_rb.velocity.x,_jumpForce);         _extraJumps --;              }     else if(Input.GetKeyDown(KeyCode.Space) && _extraJumps == 0 && _isGrounded == true)     {                  _rb.velocity = new Vector2(_rb.velocity.x,_jumpForce);     }       RaycastHit2D hitLadder = Physics2D.Raycast(transform.position,Vector2.up,_distance,_ladderLayer);      if(hitLadder.collider == true)      {         if(Input.GetKey(KeyCode.W))         {             _isClimbing = true;             _rb.gravityScale = 0;         }         else         if(Input.GetKey(KeyCode.Space))          {             _isClimbing = false;                              }            }                     if(_isClimbing == true && hitLadder.collider == true)     {                     _rb.velocity = new Vector2(_rb.velocity.x,_verticalMovement *          _ySpeed);              }     else     {         _rb.gravityScale = 1;     }       } 

How do I stop gyroscope-controlled camera from jittering when holding phone still?

I have here a simplified version of my gyro-controlled camera with a sensitivity modification (a side effect of increasing sensitivity is that the jitteriness is exacerbated).

public class GyroControl : MonoBehaviour{  private Transform _rawGyroRotation; Vector3 gyroAdjust; [SerializeField] private float _smoothing = 0.1f;  void Start() {     Input.gyro.enabled = true;     Application.targetFrameRate = 60;      _rawGyroRotation = new GameObject("GyroRaw").transform;     _rawGyroRotation.position = transform.position;     _rawGyroRotation.rotation = transform.rotation;  }  private void Update() {     _rawGyroRotation.rotation = Input.gyro.attitude;      gyroAdjust = _rawGyroRotation.rotation.eulerAngles * 2; //increase rotation sensitivity     transform.rotation = Quaternion.Euler(gyroAdjust);      transform.rotation = Quaternion.Slerp(transform.rotation, _rawGyroRotation.rotation, _smoothing);  }} 

When in motion, the jittering isn’t noticeable. But when you hold the phone still, there’s what I assume to be just analogue noise that causes jittering. I would really appreciate any help or advice on how to add a filter or something to reduce the jittering for this kind of controller.


Can I make an unarmed strike while holding a two handed weapon?

My barbarian Gus uses a Greataxe, a two handed weapon. While raging in combat against harpies, a round passed without Gus taking damage. On his turn, all harpies were out of his melee range, and he had used all his javelins. To maintain his rage, he slapped the fighter with an unarmed strike. The DM ruled that Gus could not make a unarmed strike, as he was wielding a 2 handed weapon. I argued that he was not wielding the 2 handed weapon, just holding it; my DM didn’t see the difference, and as long as Gus held a 2 handed weapon his weapon attacks must be made with that weapon. In the end I dropped the weapon, slap the fighter, then pick up the weapon as a free object interaction. Then he reminded me that rage is only maintained by attacking a hostile opponent, but that’s not important here.

I understand that a 2 handed weapon only requires 2 hands when you attack with it, and my DM agrees with that. The only debate is whether you can, while holding the weapon with 1 hand, make an unarmed strike with your other hand. The description for unarmed strikes seems to imply that you could make an unarmed strike with full hands:

Instead of using a weapon to make a melee weapon Attack, you can use an Unarmed Strike: a punch, kick, head-butt, or similar forceful blow.

Even if I did have full hands, could I have head butted the fighter here? enter link description hereWas my DM correct in this ruling, or was I?

What happens to a person who is scattered to the astral plane when inside of a destroyed bag of holding

When a bag of holding is destroyed, the contents are scattered in the astral plane. If a person is inside the bag, what happens to their body? According to the accepted answer here: “Will loot you find on the astral plane while using astral projection remain when you leave it?” – you don’t have a physical form in the astral plane. Is their body gone, forever? Or do they get a new body when they enter a physical plane?

Can a magic item be activated when someone/thing else is also holding it?

Can magic items that do not require attunement and only specify "While holding it you can…" to activate its effect (such as the Wand of Magic Missiles for example) be used when also held by someone else?

Consider a character doing the following during their turn:

  1. A character stands within reach of an ally holding the item.
  2. They use their object interaction to grab the item in a proper way (while the ally is still holding it).
  3. They activate the item with their action.
  4. They let go of the item (since dropping an item is considered "free"), which is still being held by the ally.

Would this also work if the ally was replaced with an enemy? Or if the item was in a holster or scabbard on either the activating character or someone else, or if it was just stuck in a rock?

Is it safe to bring an item like a Bag of Holding into a Genie Warlock’s Bottle?

Since the Genie’s Vessel is described as an object/vessel and never as an item, is it safe to bring a Portable Hole, Bag of Holding, or Heward’s Handy Haversack into the bottle?
If your vessel is a ring per the examples, is it splitting hairs to not call it an item?

Genie’s Vessel: — Tashas p.73
The vessel is a Tiny object, and you can use it as a spellcasting focus for your warlock spells.

Bottled Respite: — Tashas p.74
The interior of the vessel is an extradimensional space in the shape of a 20-foot-radius cylinder, 20 feet high, and resembles your vessel.

Bag of Holding: — DMG p.154
Placing a bag of holding inside an extradimensional space created by a Heward’s handy haversack, portable hole, or similar item instantly destroys both items and opens a gate to the Astral Plane.

Can a Will-o’-Wisp be put inside a bag of holding?

D&D 5e. My players were fighting their way through a swamp and, just like the question points out, they were fighting some will-o-the-wisp.

The fighter had a fun idea to put one of them inside the bag of holding. Since it was at the end of the encounter and the players were having none of it anymore, I thought it would be cool to let them pocket the wisp.

I’m looking for some rule or logic that proves this action wrong, but it’s fun to see that they got a creative idea to end the battle earlier. If anyone knows if the wisp gets away let me know why, I have some revenge plans for that little fella.

Bag Of Holding Trojan Horse. Breathing Tube!

Is it entirely possible for a Breathing tube to be places into the opening of a Bag of Holding to create a flow of air thus eradicating the need for the 10 minute limitation. This would enable people to smuggle people into a town under their cloak.

This could create a MASS amount of damage when 3 people walk into a castle and dump an army of Kobolds under a sleep spell into an empty room with a sign making a promise of free munchies for the murder of anyone within sight. Or dumping a bunch of zombies onto an unsuspecting troll under the bridge. Or even better yet! Dumping 20 or 30 freshly tied up and gagged slave goblins in front of a lich to make an escape!!

This answer strongly depends on whether or not the opening to the bag cuts the air flow through the tube.

Bag of Holding ‘bomb’ and Immovable rods

Scenario – My PC was faced with an unwinnable battle and decided to cast invisibility, sneak up the lead bad guy, toss a bag of holding into another bag of holding, essentially clearing out a 10×10 space of bad guys, including the leader.

Now here is the contestable part – The PC that essentially executed the ‘bag bomb’ placed two immovable rods tied to a rope of climbing to keep in the current plane and not be sucked into the Astral plane.

As the DM, I am struggling with – Does the Bag of Holding inside a bag of holding cause a force blast into the Astral plane or is it a teleportation – ‘blink and you are gone’ kinda of experience? Depending on the answer, then did he and the rods all get sucked or teleported through? Do I require a strength check to see if he held on and if so, vs what DC? Would the force of the ‘sucking’ be so great that he suffers damage? What would be the damage? Would he lose all of his belongings on person?

Help please!

Can a target escape a Wild Shaped Portable Hole/Bag of Holding

Inspired by this question here: Can you use Wild Shape to meld a Bag of Holding into your Wild Shape form while creatures are inside the Bag of Holding?

Portable holes state that you can use a strength check to escape it and appear within 5 feet of the holder, so if you have a creature in a portable hole, and then wild shape into some form, does that creature still have the ability to escape the hole using a strength check?

Does a Bag of holding follow the same, either trapping a target or allowing escape?

Does that mean a party could trick a big bad into the hole via a looney-toons style pitfall trap, pick it up, Wild shape, and then just wait for them to suffocate? That sounds ridiculous, and hilarious.