Changing size of a shape via script (C#)

Godot Version

v4.2.1.stable.mono.official [b09f793f5]


I’m instantiating an hitbox that is supposed to have the same shape as my character’s CollisionShape3D, but I want it to be a bit larger.

 hitboxShape = User.c.GetNode<CollisionShape3D>("CollisionShape3D").Shape;

This is how I get the shape (it’s a BoxShape, and hitboxShape is a Shape3D variable). According to the documentation, its supposed to have a Size property, however it won’t show up.

How can I change it’s size?