Attyuo2
(Attyuo2)
May 14, 2022, 10:26pm
#1
Hi! I need to use a Vector2 value to store a 2d position. It needs to be global and manifest as a physical value. I could only find a Vector3
value, and I am currently using a module script to retrieve the variable. This is annoying and unnecessary. Is there any alternative? Thanks in advanced.
1 Like
7z99
(cody)
May 14, 2022, 10:31pm
#2
Attributes allow Vector2’s and this is probably the closest you can get but there isn’t an actual Vector2Value.
There’s a feature request here:
As a Roblox developer, it is currently too hard to create a sharable value for Vector2’s. You end up using a Vector3Value!
This has big issues when trying to transfer a vector that only has 2 issues, as Vector3’s cannot be muliplied with Vector2’s, and so storing any x/y value like absolute size in a Vector3Value requires more data being moved around, decreasing performance.
If Roblox is able to address this issue, it would improve my development experience because I could use Vector2 values i…
And here:
Not much to explain about this. All it would add are two new value objects named UDim2Value and Vector2Value. I believe after adding this, it would be all of ROBLOX’s supported data types besides table.
And here:
Seeing as we’re getting UI constraints Soon™, now might be a good time to add value objects to hold the data types primarily used in GUIs.
I don’t have a specific use case for them beyond them having the same use as the current value objects (cross-script communication, interaction with the end-user, ect), but there’s no time like the present to add them.
It’s certainly something many people want so I hope it does get added at some point but for now, we have to work with what we have.
1 Like
Attyuo2
(Attyuo2)
May 14, 2022, 10:35pm
#3
We should get someone to push it forward as a suggestion
2 Likes
7z99
(cody)
May 14, 2022, 10:37pm
#4
Yeah definitely, but with the trust level system currently in place, there isn’t much that can be done to get it attention aside from liking it or posting it off roblox. It was bumped back in March but we have yet to hear from devrel about anything pertaining to the addition of these.
1 Like
Harisaiyo
(Harisaiyo)
June 20, 2023, 5:19am
#5
Still waiting for this to be implemented nearly a year later…
1 Like
Seems like the best way, for me at least, is to create a NumberValue for each vector, like SizeX
and SizeY
.
Roblox definitely needs to add a Vector2 value object, it wouldn’t even be difficult for them.