Plans for Vector2Int type?

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

I thought I read somewhere that Godot had support for Vector2Int (or at least plans for it). There’s certainly places in the API where it would make more sense than returning floating point values.

Does anyone know which version this will be part of? I want to determine how much time to put into my own “coordinates” type.

:bust_in_silhouette: Reply From: kidscancode

It’s already been implemented in the master branch:

It will be included in the 4.0 release. I haven’t seen anything about backporting it to a 3.2 release.

Thanks. They went with a strange choice for the actual name. Do you know if 4.0 will include swapping existing APIs that should be returning integers to the new type?

JimArtificer | 2020-06-01 04:32

i is consistent with other naming such as randi() or wrapi().

I haven’t spent too much time digging into it yet, as the stability hasn’t been high. I’m waiting until it gets closer to beta.

kidscancode | 2020-06-01 20:49