All posts by JoelGonzalez1

AR Portal

All instruction came from week7

  • On Github, download zip of ARPortal and extract and add it on Unity hub
  • Downlaod Smoking Room, Texture, and shader on google drive and drag the smoking room on your 3D folder, texture on texture
  • On the folder of Sponza, you would have to create a new material of SmokingRoom and drag the texture on Albedo, which is in SmokingRoomMat’s Inspector
  • On Sponza folder, drag the Sponza to SmokingRoomMat, on that inspector, you should see Stencil Comp
  • On 3D folder, drag a SmokingRoom on the scene. Reset the position
  • On the sample scene, right click the SmokingRoom and unpack Prefab. After that, separate the default and delete SmokingRoom. Rename default to SmokingRoom
  • Enable the Portal on the Inspector and in the scene, drag the SmokingRoom object to a spot where the you’ll see Portal in front of the door. Increase size of the Smoking Room if it doesn’t fit by using the scale
  • Once completing that, drag the SmokingRoomMat’s material on SmokingRoom object in the scene
  • Open your Portal prefab in sample scene and drag the SmokingRoom inside the Portal prefab. Put it under PortalPlane.
  • In Sponza’s inspector, disable it. Doing that, you’ll see a castle inside the door.
  • For SmokingRoom on the sample scene, you would to drag that on Prefabs folder.
  • On the Portal’s Inspector that shows Portal Manager (script), you would replace Sponza to SmokingRoom by dragging SmokingRoom from the SampleScene
  • Save it on HelloAR’s scene
  • Disable Portal from the Inspector
  • In addition, take a screenshot of the castle once going inside put yourself on the screenshot by using photoshop

C# Playermovement and mouselook

– Add a player with a camera that can look around

– Drag it into the centre of our scene

– Add a character controller component

– Turn on gizmos 

– Create some graphics so that we can easily see it within our scene

– Remove the capsule collider 

– Drag the main camera under our first person player

– Create a PlayerLook script that is of course responsible for our ability to look around

– On the main camera, we want to add a new component and call it MouseLook.

– On void Update, gather some input based on our mouse movement. Create a float called mouseX and set this equal to Input.GetAxis. And the axis that we want to get is the mouse x-axis. This is going to change based on our mouse movement

float mouseX = Input.GetAxis(“Mouse X”);

– We’ll also do the same for the y-axis

float mouseY = Input.GetAxis(“Mouse Y”);

– Create a public float called mouseSensitivity and let’s just default it to 100. Then when we gather the input, we can simply multiply with our mouseSensitivity and because we’re doing this inside the update function, 

– We want to make sure that we rotate independent of our current frame rate. We also want to multiply with Time.deltaTime. 

float mouseX = Input.GetAxis(“Mouse X”) * mouseSensitivity * Time.deltaTime;

– Do the exact same thing to mouse Y

float mouseY = Input.GetAxis(“Mouse Y”) * mouseSensitivity * Time.deltaTime;

– Create a public transform and call it playerBody

– Inside of our update method, we can now access playerBody.Rotate. Here we can specify an axis that we want to rotate around. So we’re going to rotate around Vector3.up and multiply that based on our mouseX

– Implement our mouseY. Create a private variable. Make a float call it xRotation and set this to zero.

– On the update, we can say xRotation minus equals our mouseY 

– Put transform.localRotation equals Quaternion dot Euler. Inside the rotation, we want to put in our xRotation for the x, zero on the y, and zero on the z 

– Add clamping this rotation. We’ll set xRotation equal to Math.Clamp. Inside the clamp, we’ll put our xRotation, negative 90 degrees and 90 degrees.

xRotation = Mathf.Clamp(xRotation, -90f, 90f);

This way we make sure that we can never over-rotate and look behind the player. 

-Add a single line of code in the start function 

-Cursor.lockState = CursorLockMode.Locked;

– Select First person player and add a new component of PlayerMovement script 

– Add some input. Create a float called x and set it equal to Input.GetAxis of horizontal. Same thing with the z and set it equal to Input.GetAxis vertical. 

float x = Input.GetAxis(“Horizontal”);

float z = Input.GetAxis(“Vertical”);

– Create a Vector3 called move. We can simply consider this an arrow that points in the direction that we want to move. So we’ll set this equal to 

Vector3 move = transform.right * x + transform.forward * z;

– We need a reference to our character controller. Create a public CharacterController and call it controller 

public CharacterController controller;

– Below the Vector3, call controller.Move, which is a function on this character controller, inside the move, we can simply put in our move Vector3.

– Create a public float called speed and set it equal to 12 by default. Then down here where we move our player, we can simply multiply our move motion by our speed. Make sure to multiple with Time.deltaTime. This way we make it frame rate independence

Public float speed = 12f;

controller .Move(move * speed * Time.deltaTime); 

– Drag Character controller to player movement’s controller

– On top of PlayerMovement’s script, create a Vector3, this is going to store our current velocity 

– Inside the method, increase velocity.y

public float gravity = -9.81;

velocity.y += gravity * Time.deltaTime;

controller.Move(velocity * Time.deltaTime);

– For groundCheck, create a public transform called groundCheck and also create a public float with the groundDistance, and finally create a public layer mask and call this ground mask 

public Transform groundCheck;

public float groundDistance = 0.4f;

Public LayerMask groundMask;

– We’ll create private variable. This is going to be bool of isGrounded. 

– Inside of our update function at the very top, set isGrounded equal to the result of our physics check. Physics.CheckSphere. This is going to create a sphere based on the groundCheck.position. Since we’re not moving down, we’re standing on the ground. 

isGrounded = Physics.CheckSphere(groundCheck.position, groundDistance, groundMask);

if(isGrounded && velocity.y < 0)


Velocity.y = -2f;


– In our ground mask, add a layer of ground

– Inside the script of PlayerMovement, create an Input.GetButtonDown, jump. This is another default input that automatically maps to the space key and we’re currently grounded. Set velocity.y equal to the square root, so Math.Sqrt. Create a public float with the jumpHeight

Public float jumpHeight = 3f; 

if(Input.GetButtonDown(“Jump” ) && isGrounded)


Velocity.y = Mathf..Sqrt(jumpHeight * -2f * gravity);


Steps of ar face mask

– Go to your build settings and select android. Once selecting it, then click switch platform

– Go to player settings in build settings and change the company name, product name

– If you’re on android platform, go to other settings in player, get rid of Vulkan on graphics APIs 

– Disable multithreaded rendering and change your package name

– Change your minimum API level to “Android 8.0 ‘Oreo’ (API level 26)

– In package manager, install AR Foundation, then install ARCore XR Plugin

– In sample scene, add AR Session Origin and AR Session

– Delete the main camera

– In the inspector of AR Session Origin, add a component of AR Face Manager

– For prefab, in the Sample scene, add AR default face

– In the assets, create a folder and name it Materials

– Inside the materials, create a material

– Change the color if you want

– In AR default face’s inspector, drag your material in Element 0 

– You want AR default face to become prefab. In order to do that, you have to create a folder of prefab and drag AR default face in the prefab’s folder. You can delete AR default face on Sample scene after you dragged it on the folder

– In AR session origin, drag the prefab to AR face manager of face prefab

– Build and Run 

Artivive Super Saiyan 3

In the beginning of the Artivive, I was using Safari and not Google Chrome. I had lots of moments where the gif wouldn’t work and website constantly trolling. Example: unable to change the color. Throughout my suffering, I’ve contacted professor and he gave me a website where I can turn the gif into mp4. I finally decided to change my safari to Google Chrome since there were some glitches that were extremely annoying. And BANG, super saiyan 3 with electricity motion. I want to print out the image because I downloaded an app of Artivive, but I freaking have low inks.

Dragon Ball Z

Dragon Ball Z/Super follows the adventures of the adult Goku who along with his companions, defends the earth against an assortment of villains ranging from intergalactic space fighters and conquerors, unnaturally powerful androids and near indestructible magical creatures. 

Ki is also known as “latent energy” or “fighting power,” which directly translates as “life force.” This force is a tangible energy inside every living being, with its major focus being in the center of the body. By drawing it out, an individual is able to manipulate it and use it outside the body. Ki can be used for many different techniques. Because there are physical limits to the strength of the body itself, it is necessary to increase one’s ki to overcome this barrier and become stronger. Usually, the more concentrated the masses are, the more time the user requires to draw it out by powering up. When fighters gather ki, they are able to gain enhanced strength, speed, endurance, and can increase the power of their attacks to inflict greater damage to opponents. Normally, the more the ki is increased, the harder it is to control, so ki control is also important. Energy can be lost when the user sustains injuries, as exclaimed by Gohan when he loses over half of his maximum energy supply when hit by Cell’s Time to die. Maintaining proper balance between the body and spirit is important in utilizing energy, and the more properly balanced they are, the more energy you can project.

Ki sensing is the ability to sense the location, life force, and power level of anyone; the stronger and closer the enemy, the more powerful the sensation. Also, if a ki is very powerful, it can be sensed from afar by people who are trained to sense energy

The concept of ki/chi exists in martial arts – typically eastern ones and practices related to healing.

It does not allow you to shoot balls of energy. There are people who claim to heal with chi, and there are people who claim that they use it in fight – for achieving resistance to wounds or making limb/body “unbendable”.

It is unclear whether this is something that actually exists or a mental construct that instructs your body to work in a specific way (some of the stuff is similar to “autogenic training”, for example). The other thing is, that some of the supposed effects are very easy to fake when filming. So unless you run into a ki user yourself, you won’t know if it is real or not. If you do run into such user and experience the effects, then nobody will ever believe you, obviously.




Across U.S., police officers abuse confidential databases

No single agency tracks how often the abuse happens nationwide, and record-keeping inconsistencies make it impossible to know how many violations occur. But the AP, through records requests to state agencies and big-city police departments, found law enforcement officers and employees who misused databases were fired, suspended or resigned more than 325 times between 2013 and 2015. They received reprimands, counseling or lesser discipline in more than 250 instances, the review found.

Officers are instructed that those systems, which together contain data far more substantial than an internet search would yield, may be used only for legitimate law enforcement purposes. They’re warned that their searches are subject to being audited and that unauthorized access could cost them their jobs or result in criminal charges. Yet misuse persists,


Edward revealed an NSA program called Optic Nerves. The operation was a bulk surveillance program under which they captured webcam images every five minutes from Yahoo users’ video chats and then stored them for future use. It is estimated that between 3% and 11% of the images captured contained “undesirable nudity”

Government security agencies like the NSA can also have access to your devices through in-built backdoors. This means that these security agencies can tune in to your phone calls, read your messages, capture pictures of you, stream videos of you, read your emails