How can I change in Cinemachine the Game Window Guides center to be on the player center? - unity3d

On the game view on the left the yellow small square is on the player foot and the whole rectangle on the bottom is down out the view.
How can I move up the yellow small square of the Game Window Guides to be on the player center and that the bottom of the Game Window Guides rectangle will be fit in the game view so I can control it change it's size ?
In this screenshot I'm using paint to add circle/s to explain more what do I mean the yellow small square and what do I mean by fit the size and that is out at the bottom :
I use blue circle to show the yellow small square I meant and blue rectangle to show the bottom that is getting out the Game view :
How can I change in Cinemachine the Game Window Guides center to be on the player center ?
The small yellow square I think and I want to be on the character center body not on his foot.
And on the bottom I can't drag the Game Window Guides since it's out on the bottom.

Under Middle Rig property, change the y-axis from 0 to 1.

Related

How do I make my UI text centered to my 2d object when changing resolutions in Unity?

I have a 2d circle in the scene, and a text inside it that I want to always be in the middle of the circle when I am changing resolutions.
For better understanding, it's just like a replica game.
You can create a circle including a text box. Make the text box child object of your circle and add HorizontalLayoutGroup to your circle
Tick all of its properties.

How to I make the X and Y position of an object in unity refer to the top left of the object, instead of the center?

the image of the object, with the x and y coordinates referring to the middle of the object
I'm kind of a noob at unity, but I'm pretty sure I've done this before. Is there a way to change the position of the blue circle to the top left of the object?
If That white box is a Sprite, then just click the sprite filed to open it in inspector. And Click [Sprite Editor] button in the middle of inspector. There you can just drag blue circle (the center of that sprite). And then press [Apply] button in inspector.
If that white box is a GUI Image ( I think probably not.) , then you need too do some scripting for it. ( Just Re-Arrange it whit modified center with code )

How to animate an object from World canvas to Overlay Canvas

I have a bar on the top of my game with some objects plus the game score, pretty basic and usual. I have some coins (similar to Mario's game) that I would like to animate from the world canvas to the top of my bar that is in a canvas overlay.
By design, the Canvas Overlay is drawn after the camera, so it is on top of my world canvas, so the animation happens to the right position but the object passes behind my menu, not on top of it.
How can I achieve that? To animate an object from my world canvas to the top of an object in a canvas overlay?
This is the my "BAR", the big blue quad behind is the equivalent of my coin and I wish to draw it on top of the small bar.
This is the inspector, the big quad is the object "PieceOfShapeIClone" and the bar in front of it is the "ShapeI" object. Since the "PieceOfShapeIClone" is below it should be rendered on top of the previous objects.
The "Screen Space - Overlay" does not have any dependency on the camera and it is rendered on top of everything.
The solution was to use "Screen Space - Camera" instead, this will require a camera plus set the "depth" of your canvas to the camera, giving the ability to interact with the objects from the scene.
Hope that this help to assist others with the same issue.
Manual -> https://docs.unity3d.com/Manual/class-Canvas.html

Transformation Sprite with finger move

I am making an Drawing App in someway like Paint in Windows
I have a toolbar with many shapes button such as Rectangle, Circle, Triangle, etc. When tap a button i add a sprite with shape with button's name.
I want to add functions like this
- When tap on shape it show four 4 points each corner of shape that i can touch and drag to skew or scale.
Same as we do with an image in photoshop or MSWord
anyone have sample code or tutorial ?
Use this code for your app.
Paint
Drawing
Drawing2

ios game make a mask layer effect

I need a 'mask' layer that covers the whole screen, with the center part (a circle) to be transparent. Then I can move the mask layer around using touch. User are only able to see the transparent part in the middle.
I don't think a png file can help because the file need to be very large to cover the whole screen.
So is it possible to do it by coding?
i found this online, but don't know much about openGL. http://www.cocos2d-iphone.org/forum/topic/7921.
it would be great if i can use a CCMaskLayer and input with the radius. i can handle the touch event by my self.
the attached png file is expected result, the center part is transparent. i need this to cover my screen, and only show the middle part. the red part is covered.
I write a CCMaskLayer to do the exactly same thing.
https://github.com/smilingpoplar/CCMaskLayer
You may solve this task with cropped circle texture in two ways:
1) Draw sprite with circle texture in screen center and draw another 4 sprites around (on top, bottom, left and right sides) with small red texture but scaled to cover all screen.
2) (more elegant but harder to implement) Make your mask layer fullscreen but adjust texture coordinates. In details:
set wrap mode to GL_CLAMP_TO_EDGE to your circle texture
adjust texture coordinates of your layer vertices (to do this you need to subclass base CCLayer):
Here v means vertex position and t - texture coordinates. You need to set correct texture coordinates for four corner vertices of layer. For future if you will want to drag circle you will need to add some offset values to texture coordinates.