Search Feedback

0
votes

More Vector2Int and Vector3Int support

Scripting

-

-

VectorInts lack the most basic functionality of the normal vector class

VectorInts do not a the / operator
This is my biggest problem with them because I cant make an extension method for this and not have it be messy and uncomfortable to use
This makes code very messy, as I had to make a new vector any time I wanted to divide one, like this:
new VectorInt( oldVector.x /2, oldVector.y /2 );

VectorInts do not have a .normilized property.
I think a property like this one should be added, and have a return type of Vector2 or Vector3, so you wouldn't have to use conversions like
((Vector) vectorInt).normilized

VectorInts lack nearly all the methods of normal Vectors, such as Angle, Reflect, Lerp and more, which leads to things like
Vector3Int.RoundToInt( Vector3.Reflect((Vector2) vector2Int) )

Vector2s don't have a conversion operator to a Vector2Int and Vector3 don't have one for Vector3Int
for example:
works: transform.position = (Vector2) myVector2Int;
doesn't: transform.position = (Vector2Int) myVector2;
insted: transform.position = Vector2Int.RoundToInt(myVector2);
this just makes code very confusing to read

also
transform.position = (Vector2) myVector2Int;
it would be much better if we could write
transform.position = myVector2Int;

These aren't major problems and probably aren't high on the todo list, but fixing them will make life slightly better

Your opinion counts

Help us make things better. Share your great idea for improving Unity or vote for other people’s.

Log in to post a new idea

Categories

All

(10516)

2D

(274)

Ads

(52)

AI & Navigation

(78)

Analytics

(125)

Animation

(389)

Asset Store

(332)

Asset Store Publisher

(10)

Assets

(534)

Audio

(176)

Cloud Build

(139)

Collaborate

(57)

Docs & Tutorials

(237)

Editor

(2452)

Everyplay

(14)

Game Performance Reporting

(15)

General

(950)

Graphics

(861)

GUI

(422)

Input

(165)

Licensing

(88)

Networking

(185)

Physics

(380)

Platforms

(438)

Profiling & Optimization

(81)

Runtime

(180)

Scripting

(1147)

Terrain

(168)

WebGL

(141)