当前位置:网站首页>The earth revolves around the sun
The earth revolves around the sun
2022-07-06 12:54:00 【SQ Liu】
The earth revolves around the sun
newly build Unity3D engineering , Do some preparatory work
1、 newly build 2 individual 3D sphere , Rename each to :Sun,Earth
2、 stay Project The palette , newly build Texture,Material,Scripts Folder
(1) stay Texture Under the folder , Import mapping material ( Baidu search sun map 、 Just map the earth . The following is my baidu material )
(2) stay Material Under the folder , Create separate 2 Materials , Put their Shader Shader changes , As shown in the figure below
(3) stay Scripts Under the folder , establish C# Script , Double-click to open , Write code
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class earthAroundSun : MonoBehaviour
{
public Transform sun;
void Update()
{
transform.RotateAround(sun.position, Vector3.up, 1f); //RotateAround Is rotating around another point
}
}
3、 go back to Unity3D, take Sun Component drag in Sun in , Here's the picture
4、 Achieve the effect diagram
边栏推荐
- GNSS定位精度指标计算
- [algorithm] sword finger offer2 golang interview question 4: numbers that appear only once
- Affichage du changement de valeur du Buff de gain de l'interface graphique de défaillance
- 1041 be unique (20 points (s)) (hash: find the first number that occurs once)
- 记录:Navicat Premium初次无法连接数据库MySQL之解决
- Devops' future: six trends in 2022 and beyond
- C code implementation of robust estimation in rtklib's pntpos function (standard single point positioning spp)
- (课设第一套)1-5 317号子任务 (100 分)(Dijkstra:重边自环)
- Naive Bayesian theory derivation
- [algorithm] sword finger offer2 golang interview question 6: sum of two numbers in the sorting array
猜你喜欢
《软件测试》习题答案:第一章
[算法] 剑指offer2 golang 面试题5:单词长度的最大乘积
编辑距离(多源BFS)
Derivation of logistic regression theory
Fairygui character status Popup
【无标题】
[算法] 剑指offer2 golang 面试题12:左右两边子数组的和相等
Detailed explanation of balanced binary tree is easy to understand
Halcon knowledge: gray_ Tophat transform and bottom cap transform
FairyGUI增益BUFF數值改變的顯示
随机推荐
Compile GDAL source code with nmake (win10, vs2022)
Compilation principle: preprocessing of source program and design and implementation of lexical analysis program (including code)
Usage differences between isempty and isblank
Containers and Devops: container based Devops delivery pipeline
Force buckle 1189 Maximum number of "balloons"
记录:初次cmd启动MySQL拒接访问之解决
wsl常用命令
FairyGUI按钮动效的混用
染色法判定二分图
IText 7 generate PDF summary
记录:newInstance()过时的代替方法
[algorithme] swordfinger offer2 golang question d'entrevue 2: addition binaire
Mysql database index
【干货】提升RTK模糊度固定率的建议之周跳探测
地球围绕太阳转
FairyGUI条子家族(滚动条,滑动条,进度条)
[algorithm] sword finger offer2 golang interview question 7: 3 numbers with 0 in the array
FairyGUI簡單背包的制作
[算法] 剑指offer2 golang 面试题4:只出现一次的数字
FairyGUI摇杆