This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

I am in Godot 4, and I'm trying to make my capsule crouch, I'm doing this by changing the height of the capsule's collision shape, but it is bringing back an error saying- Invaild get index 'hieght' (on base: 'ConvexPolygonShape3D')

Does anyone know a good fix for this?

Godot version 4..0 beta 1
in Engine by (26 points)

1 Answer

+2 votes
Best answer

Well, you've spelled "height" wrong, but that's not really your error.

A ConvexPolygonShape3D does not have a height property.

As a beginner, I highly recommend against using the Godot 4 alpha. There are still bugs, and there is very little documentation because it is not a release version yet. You would be much better off sticking to 3.x which is well documented and has plenty of examples for you to learn from.

You can move to Godot 4 when it is released as a stable version.

by (22,191 points)
selected by

Thanks for the help! Do you know of any substitute I could use instead of the height property? I'd like to stick to Godot 4 just because I want to get used to it and get ahead of the curve.

A polygon is just a collection of points. You probably would be better off adjusting the scale of the shape.

Struggling with Godot 4 isn't getting you "ahead of the curve", it's just making it harder for you to progress. But it's up to you...

Does scale follow the different axis? (scale.y edits y axis, scale.x edits x axis, etc.)
I appreciate the advice, I will start working with Godot 3 after I finish my current project.

Edit: Just figured out how scale works. Thanks for all your help @kidscancode! I really appreciate it! :D

Yes, you can scale on individual axes.

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.