0 votes

How to change the height, or scale of a box that is used as a collisionshape for a fps character in gdscript? Might be a stupid question, but I am new and couldnt find anything in the docs or a similar question to mine as they are all about 2D and not 3D
Thanks for every answer

Godot version 3.5.1
in Engine by (12 points)

1 Answer

+2 votes

Something like this:-

var shape: RectangleShape2D = $Node/CollisionShape2D.shape
shape.extends.x += 10
by (1,053 points)

And how is that for 3d? Change the 2d to 3d lr are there other calls?

It's pretty much exactly the same:-

var shape: BoxShape = $Node/CollisionShape.shape
shape.extents.x += 10
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.