Skip to content

Commit

Permalink
ASCII FBX exporter added and camera jump on first time orbit fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
pulkitgarg784 committed Mar 7, 2021
1 parent 7a453dd commit 541a78a
Show file tree
Hide file tree
Showing 38 changed files with 16,002 additions and 463 deletions.
26 changes: 20 additions & 6 deletions .idea/.idea.Voksel/.idea/contentModel.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/.idea.Voksel/.idea/indexLayout.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

68 changes: 59 additions & 9 deletions .idea/.idea.Voksel/.idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Assets/red.mat → Assets/Base.mat
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Material:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: red
m_Name: Base
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 4
Expand Down Expand Up @@ -73,5 +73,5 @@ Material:
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 0.8773585, g: 0.120016046, b: 0.120016046, a: 1}
- _Color: {r: 0.116767526, g: 0.292129, b: 0.6037736, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
8 changes: 8 additions & 0 deletions Assets/Base.mat.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions Assets/Cube.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ GameObject:
- component: {fileID: 6798081440881224543}
- component: {fileID: 6798081440881224542}
- component: {fileID: 898581808174137867}
- component: {fileID: 748663017}
m_Layer: 0
m_Name: Cube
m_TagString: Untagged
Expand Down Expand Up @@ -106,3 +107,22 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 5b0b23ed835172f4082c9a82ab0107b9, type: 3}
m_Name:
m_EditorClassIdentifier:
canDelete: 1
--- !u!114 &748663017
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6798081440881224537}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5fea29bb7c508c244a1f805a5fd3fc4d, type: 3}
m_Name:
m_EditorClassIdentifier:
outlineMode: 1
outlineColor: {r: 0, g: 0, b: 0, a: 1}
outlineWidth: 2
precomputeOutline: 0
bakeKeys: []
bakeValues: []
123 changes: 0 additions & 123 deletions Assets/Editor/MeshCombineWizard.cs

This file was deleted.

7 changes: 6 additions & 1 deletion Assets/PlaceCube.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;

public class PlaceCube : MonoBehaviour
{
private Camera mainCamera;
public Transform parent;
public GameObject cube;
public float gridSize;
Vector3 wordPos;
Expand All @@ -20,6 +22,8 @@ void Update()
Vector3 mousePos=new Vector3(Input.mousePosition.x, Input.mousePosition.y, 0f);

if(Input.GetMouseButtonDown(0)) {
if(EventSystem.current.IsPointerOverGameObject())
return;
Ray ray=mainCamera.ScreenPointToRay(mousePos);
RaycastHit hit;
if(Physics.Raycast(ray,out hit,1000f)) {
Expand All @@ -31,7 +35,8 @@ void Update()
wordPos.y = Mathf.Round((wordPos.y / gridSize) *gridSize);
wordPos.z = Mathf.Round((wordPos.z / gridSize) *gridSize);
Debug.Log(wordPos);
Instantiate(cube,wordPos,Quaternion.identity);
GameObject go = Instantiate(cube,wordPos,Quaternion.identity);
go.transform.SetParent(parent);
}

}
Expand Down
Loading

0 comments on commit 541a78a

Please sign in to comment.