How do I fix the "Invaild get index 'hieght'" error?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By NewbieGodotUser

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?

:bust_in_silhouette: Reply From: kidscancode

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.

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.

NewbieGodotUser | 2022-09-09 18:23

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…

kidscancode | 2022-09-09 18:33

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! :smiley:

NewbieGodotUser | 2022-09-09 18:38

Yes, you can scale on individual axes.

kidscancode | 2022-09-09 19:30