godotengine/godot

Using index access on Quaternion type data to get values will result in a parsing error.

オープン

#120,318 opened on 2026/06/15

 (3 件のコメント) (0 件のリアクション) (0 人の担当者)C++ (25,320 件のフォーク)batch import
bugconfirmedgood first issuetopic:gdscript

Repository metrics

Stars
 (110,708 個のスター)
PR merge metrics
 (平均マージ 78d 14h) (30d で 350 merged PRs)

説明

Tested versions

  • Reproducible in: 4.7-rc2 and earlier versions.

System information

Godot v4.7.beta (33431363d) - Fedora Linux 44 (Workstation Edition) on Wayland - Wayland display driver, Single-window, 1 monitor - OpenGL 3 (Compatibility) - Mesa Intel(R) HD Graphics 3000 (SNB GT2) - Intel(R) Core(TM) i3-2348M CPU @ 2.30GHz (4 threads) - 15.45 GiB memory - PulseAudio (44100 Hz, Stereo/mono)

Issue description

Using index access on Quaternion data to get values will cause parsing errors; you can't access the x, y, z, w components of a Quaternion through indexing. However, similar types like Basis, Color, Transform2D, and VectorX can be accessed by index without any issues.

Please check the description in the game engine's documentation.

https://docs.godotengine.org/en/latest/classes/class_quaternion.html#class-quaternion-operator-idx-int

Steps to reproduce

Write the following statements in the script:

	var q:Quaternion=Quaternion()
	q[0]

Minimal reproduction project (MRP)

Quaternion.zip

コントリビューターガイド