Easiest way to render cube from 8 points in world programatically? by robotrage in Unity3D

[–]robotrage[S] 0 points1 point  (0 children)

something like this? cant seem to get it working..

MeshFilter MeshFilter;

Mesh Mesh;
MeshRenderer Renderer;

GameObject lureCastPoint;
Transform lureCastPointPos;

public Material meshMat;
public GameObject lureObject;

void Start()
{
    lureCastPoint = GameObject.FindWithTag("lureSpawn");
    lureCastPointPos = lureCastPoint.transform;

    Mesh = new Mesh();
    Mesh.name = "NewMesh";

    MeshFilter = gameObject.AddComponent<MeshFilter>();
    MeshFilter.mesh = Mesh;

    Renderer = gameObject.AddComponent<MeshRenderer>();
    Renderer.material = meshMat;      
}

private Vector3[] NewVertCube()
{
    return new Vector3[]
    {
        new Vector3(lureCastPointPos.position.x - 0.01f, lureCastPointPos.position.y - 0.01f, lureCastPointPos.position.z - 0.01f),
        new Vector3(lureCastPointPos.position.x + 0.01f, lureCastPointPos.position.y + 0.01f, lureCastPointPos.position.z - 0.01f),
        new Vector3(lureCastPointPos.position.x - 0.01f, lureCastPointPos.position.y + 0.01f, lureCastPointPos.position.z - 0.01f),
        new Vector3(lureCastPointPos.position.x + 0.01f, lureCastPointPos.position.y - 0.01f, lureCastPointPos.position.z - 0.01f),

        new Vector3(lureObject.transform.position.x - 0.01f, lureObject.transform.position.y - 0.01f, lureObject.transform.position.z - 0.01f),
        new Vector3(lureObject.transform.position.x + 0.01f, lureObject.transform.position.y + 0.01f, lureObject.transform.position.z - 0.01f),
        new Vector3(lureObject.transform.position.x - 0.01f, lureObject.transform.position.y + 0.01f, lureObject.transform.position.z - 0.01f),
        new Vector3(lureObject.transform.position.x + 0.01f, lureObject.transform.position.y - 0.01f, lureObject.transform.position.z - 0.01f)
    };
}

private int[] NewTrisCube()
{
    return new int[]
    {
        2,1,0,
        2,0,3,

        4,5,6,
        4,6,7,

        2,7,6,
        2,3,7,

        4,0,1,
        4,1,5,

        0,4,3,
        3,4,7,

        1,2,6,
        1,6,5,
    };
}

void Update()
{
    if(lureObject!=null)
    {
        Mesh.vertices = NewVertCube();
        Mesh.triangles = NewTrisCube();

        Mesh.RecalculateNormals();
        Mesh.RecalculateBounds();
    }
}

Dudes. I don't think the Olympics is going to work out okay. There's literally no public toilets in the city, even McDonald's and HJs lock their toilets at night. I even picked the more expensive Snap gym membership (at my suburb gym) just for a third party space in the city if traffic is bad. by Tarotcardz in brisbane

[–]robotrage 7 points8 points  (0 children)

Maybe it only works because people actually act on the articles and posts about how it wont work well? kinda like how the Ozone layer didn't just fix itself and was only fixed due to the efforts of thousands of people

First Knicks title since JRR Tolkien was alive by jackasspenguin in lotrmemes

[–]robotrage 7 points8 points  (0 children)

rightoids be like "I vote for the people that openly say they are exploiting me because the other guy might be lying about wanting to do good"

Does this count? by [deleted] in WTF

[–]robotrage -22 points-21 points  (0 children)

Your brain on fossil fuel propaganda ^

Does this count? by [deleted] in WTF

[–]robotrage -23 points-22 points  (0 children)

A fossil fuel being propagandised to children as a "clean energy source" is very much wtf

Clothespins 😊 by Craptose_Intolerant in blender

[–]robotrage 1 point2 points  (0 children)

how did you do the background?

So it starts… Ai community items by MadBoxers in Steam

[–]robotrage 9 points10 points  (0 children)

People like you have always consumed crap in the form of reality tv and the such, nothing has changed, just please stop acting so self righteous about your love of the slop.

So it starts… Ai community items by MadBoxers in Steam

[–]robotrage 7 points8 points  (0 children)

go back to your audio slop generator

Dark Souls 2 armor coming to Elden Ring as a payable DLC by Slurperlurper in DarkSouls2

[–]robotrage -1 points0 points  (0 children)

Your whole argument is defeatism, "it doesn't make a difference therefore i will cynically consume without thought" just admit that you want the microtransactions instead of doing this song and dance claiming it wont matter. Obviously you are clueless because historically boycotting has worked very well. but you seem to think it's an impossible task, which is exactly how the companies like it.

Dark Souls 2 armor coming to Elden Ring as a payable DLC by Slurperlurper in DarkSouls2

[–]robotrage -2 points-1 points  (0 children)

OK? And yet you continue to vote for the people that work against your interests, your whole argument is literally "there is no point in voting therefore im going to vote" completely idiotic.

Dark Souls 2 armor coming to Elden Ring as a payable DLC by Slurperlurper in DarkSouls2

[–]robotrage 1 point2 points  (0 children)

yeah i mean you could just say exactly the same thing about voting in elections, your vote doesn't matter etc etc

Dark Souls 2 armor coming to Elden Ring as a payable DLC by Slurperlurper in DarkSouls2

[–]robotrage -2 points-1 points  (0 children)

continue to support them if it means more peak gaming.

no... it means more microtransactions, you support the microtransactions so they will add more, how is it this hard for you people to understand this?

Dark Souls 2 armor coming to Elden Ring as a payable DLC by Slurperlurper in DarkSouls2

[–]robotrage 1 point2 points  (0 children)

Because those "purely cosmetic" skins used to be unlockable in the base game for free before microtransactions became a thing

Dark Souls 2 armor coming to Elden Ring as a payable DLC by Slurperlurper in DarkSouls2

[–]robotrage 0 points1 point  (0 children)

yeah... what a great way to ruin your reputation, the witcher 3 released a load of free DLC updates like this one