- Vectrosity is a very powerful system, and expose a highly flexible api when scripting. It makes it very difficult to implement as custom actions, because of the gui restrictions to define the interface for an action. So I had to make decisions.
- Vectrosity uses screen space for line coordinates. In screen space, (0, 0) is the bottom-left corner, and (Screen.width-1, Screen.height-1) is the upper-right corner. Input.mousePosition, for example, uses screen space. When using Vector3 points, Vectrosity uses world space for line coordinates, like normal 3D objects do.
- Demo of Unity3D Vectrosity Plugin draw 2D/3D line. LoranceChen/VectrosityDemo.
Apr 20th, 2017
I am using Vectrosity to draw some shapes and I have come across a problem I'm unable to solve. Copie de gsm magic download. This is not an issue with Vectrosity, but rather a hole in my knowledge. I hope someone here can help me get this right!:) The red bar in the image is moving around. Find your perfect free vectors & image.Millions of Free Graphic Resources. Using google apps for education in the classroom. Vectors Stock Images. All that you free to use for your Creative Projects. Otanix mugen.
Never
Not a member of Pastebin yet?Sign Up, it unlocks many cool features!
- using Vectrosity;
- using System.Collections.Generic;
- public class DrawLines : MonoBehaviour {
- public float rotateSpeed = 0.0f;
- private VectorLine line;
- private bool continuous = false;
- private bool thickLine = true;
- private Color linesColor = new Color (0, 0, 0);
- public Texture2D frontTex;
- void Start() {
- }
- void SetLine () {
- if (!continuous) {
- }
- var lineType = (continuous? LineType.Continuous : LineType.Discrete);
- var joins = (fillJoins? Joins.Fill : Joins.None);
- VectorLine.SetEndCap ('arrow', EndCap.Mirror, lineTex, frontTex);
- line = new VectorLine('Arrow', new List<Vector2>(), lineWidth, lineType, joins);
- endReached = false;
- // Since we can rotate the transform, get the local space for the current point, so the mouse position won't be rotated with the line
- var mousePos = transform.InverseTransformPoint (Input.mousePosition);
- if (Input.GetMouseButtonDown (0) && canClick && !endReached) {
- if (line.points2.Count 1) {
- }
- if (line.points2.Count maxPoints) {
- }
- // The last line point should always be where the mouse is; only draw when there are enough points
- line.points2[line.points2.Count-1] = mousePos;
- }
RAW Paste Data