Having alignment tool to either align an object of the center of the scene on the y axis or x axis or aligning it with another object, stuff like that!!
Really Support this, have no idea why this feature isn’t requested that much.
There are so many things that I want to align perfectly and have a hard time doing so.
Alignment tools are very easy to implement and it’ll contribute a lot to the user experience.
Totally support this.
If we understand that everything is positioned by its origin point
Which is top left corner X0 Y0 pixel position of object
Then
Putting something at CameraBorderLeft() CameraBorderTop()
Will change its position to top left corner
White is your viewport
Red is your object you just positioned with above expressions
Yellow on red is origin point of red object
Green are X and Y Center of screen
If we want to move it to the right
Then going with CameraBorderRight() CameraBorderTop()
Will Result in it going off screen
Cause again it is positioned based on its origin point
To combat this we go with CameraBorderRight()-Object.Width() CameraBorderTop() and we get this
How about CameraBorderRight() CameraBorderBottom() ??
Armed with knowledge we gathered so far how about
CameraBorderRight()-Object.Width() CameraBorderBottom()-Object.Height()
And now we know how to properly position it to each edge of screen
What about center?
Let’s check
CameraCenterX() CameraCenterY()
Nah let’s try CameraCenterX()-Object.Width() CameraCenterY()-Object.Height()
Too much so we would need like half of its width and height
Well let’s try
CameraCenterX()-(Object.Width()/2) CameraCenterY()-(Object.Height()/2)
I would say now we can position it to whatever the hell we want
Now we can position other object to position of our red object
And we just change position of red object to affect position of both
There is anchor behavior and same as alignment tool i say it would be cool to have but wrong to use
I can go into any expression and do like CameraBorderLeft()+20
And now my object is 20 pixel to the right from left camera border
I can put there variable and change that variable to allow players to position objects as they please
For example touch buttons/joystick
We do not have same size hands and phones so it would help a lot
Now imagine would it be easier to do it via alignment tool or via expressions?
Before you answer go try to do same crap i did with anchor behavior
I am not saying it is bad cause i think it is awesome tool
I just say i feel its better to use change position with expressions
i think you completely misunderstood the feature request
So can you explain it to me?
having snapping inside the editor itself and not applying it in the code
So you are talking about anchor behavior just built in one?
no, im talking about in editor, snapping not anchoring, not a behaviour. literally just dragging the object to an edge or the middle of the screen and it snaps, like in a photo editor
IF its in editor then what is the point?
Your camera won’t be exact same place for your game as your editor viewport
Well at least in 80% of games
NOT to mention resolution/ratio of display vary widely
So it would make no sense to have such option
Or i really do not get your point
The best way of explaining that!
its not just from the camera, its also for objects, if you know wanna align objects to have a consistent spacing of something like that, before you had to count the amount of times you pressed the down arrow to get consistent spacing
What about grids? They exist.
Ok i still fail to understand what you are after or maybe why you are after it
I gonna just watch what other ppl write here and maybe i will understand