Search Unity

Question Transparent only one object the player cube mode by script C+

Discussion in 'Animation' started by indy66, Jun 7, 2020.

  1. indy66

    indy66

    Joined:
    Oct 15, 2013
    Posts:
    11
    Hi!
    I want to make one simple project to learn the basic functions API.
    1/ Turning on wireframe mode will affect all objects rendered after the call ------------- only one ? it is possible
    GL.wireframe = true;
    Block out on AMIGA .
    Rendering Mode, Unity applies a number of changes to the Material. There is no single C# API to change the Rendering Mode of a Material, but you can make the same changes in your code.
    case BlendMode.Transparent: (only one object the cube).
    2/ color class
    The Color class uses values from 0 to 1, not 0 to 255.
    How do you manage to create the aim color on object by % on UI (with mouse or joystick no matter) .
    Color32 ,there is a 4th argument which is a or transparency.Trnasparency is
    how to find RGB code (in the UI % on R,G,B).
    3 / rotate an object smoothly by 90 degrees, or -90 on the X,Y,Z axis every time it collides with an object..
    one AXIS
    • rotateTarget = Quaternion.Euler(transform.localRotation.eulerAngles.x,
    • transform.localRotation.eulerAngles.y + (Random.Range(0,2) == 0 ? 90 : -90) ,transform.localRotation.eulerAngles.z); Thanks .
     
  2. Undertaker-Infinity

    Undertaker-Infinity

    Joined:
    May 2, 2014
    Posts:
    112
    You can toggle it per camera, as seen here
    https://docs.unity3d.com/ScriptReference/GL-wireframe.html

    You could have a wireframe layer and have the objects that need to be wireframe switch layers
    Make sure your physics (if you're using them) have collision enabled between the layers you need collision enabled on
     
  3. indy66

    indy66

    Joined:
    Oct 15, 2013
    Posts:
    11
    Thanks a lot!
    I'm happy it is possible to toggle mode with using wireframe.
    I have to make another layer and select my object and using transparency Fx that's true ?
    My aim is to make a game by using one Voxel model gererate by maths and the purpose is to make the right sequence of color , like a simon videogame to paint same color than the program by randomize done;
    or two gmer eqch other try to paint the object Voxel in less minutes than the other.



    the script is valid and the rsult very cool and easy to change the parameters or the maths curves;
    https://mathcurve.com/surfaces/mobius/mobius.shtml
    https://mathcurve.com/surfaces/ellipsoid/ellipsoid.shtml
    https://mathcurve.com/surfaces/paraboloidhyperbolic/paraboloidhyperbolic.shtml


    the layer creator



    upload_2020-6-10_19-28-54.png
     
  4. Undertaker-Infinity

    Undertaker-Infinity

    Joined:
    May 2, 2014
    Posts:
    112
    in Physics Manager the matrix just lists existing layers, which you can add to (I think you can't remove the defaults?)
    There's no special meaning in the default layers, they're just the ones you'll usually have.
    In the matrix you have to check the layers that can collide with each other, that's all.

    So if you create a new "wireframe" layer and have a new camera (we'll call it wirecam) that follows the main one (we'll call it maincam), you set maincam to render all layers but wireframe, and set wirecam to only render wireframe. Now if you move an object from the default layer to the wireframe layer, it'll turn wireframe.... but it won't collide anymore with the objects in the default layer! for them to collide, you'd have to check the default/wireframe collision tin the manager.

    If you're not using collisions, none of this is important.
     
  5. indy66

    indy66

    Joined:
    Oct 15, 2013
    Posts:
    11
    hi!

    thanks for collision, in my case it is a matter because i want to test a hit between bloc and another bloc.
    If i change the mode wireframe to normal with shape on object in the plane of the end aera, it will be all right to collide two bloc.