当前位置:网站首页>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
边栏推荐
- 记录:newInstance()过时的代替方法
- Agile development helps me
- (the first set of course design) 1-4 message passing interface (100 points) (simulation: thread)
- [899] ordered queue
- MySQL performance tuning - dirty page refresh
- 记录:初次cmd启动MySQL拒接访问之解决
- Mixed use of fairygui button dynamics
- Meanings and differences of PV, UV, IP, VV, CV
- idea问题记录
- SVN更新后不出现红色感叹号
猜你喜欢
[algorithm] sword finger offer2 golang interview question 4: numbers that appear only once
C programming exercise
[算法] 剑指offer2 golang 面试题5:单词长度的最大乘积
[算法] 剑指offer2 golang 面试题1:整数除法
RTKLIB: demo5 b34f.1 vs b33
《软件测试》习题答案:第一章
Fairygui loop list
Prove the time complexity of heap sorting
[算法] 剑指offer2 golang 面试题9:乘积小于k的子数组
地球围绕太阳转
随机推荐
Compile GDAL source code with nmake (win10, vs2022)
Idea problem record
[算法] 剑指offer2 golang 面试题6:排序数组中的两个数字之和
Fabrication d'un sac à dos simple fairygui
Easy to use shortcut keys in idea
(课设第一套)1-4 消息传递接口 (100 分)(模拟:线程)
SVN更新后不出现红色感叹号
雇佣收银员【差分约束】
染色法判定二分图
FGUI工程打包发布&导入Unity&将UI显示出来的方式
Unity3D基础入门之粒子系统(属性介绍+火焰粒子系统案例制作)
WSL common commands
There is no red exclamation mark after SVN update
【GNSS】抗差估计(稳健估计)原理及程序实现
【干货】提升RTK模糊度固定率的建议之周跳探测
[algorithm] sword finger offer2 golang interview question 8: the shortest subarray with a sum greater than or equal to K
[算法] 剑指offer2 golang 面试题5:单词长度的最大乘积
What are the advantages of using SQL in Excel VBA
[算法] 剑指offer2 golang 面试题7:数组中和为0的3个数字
Solution to the problem of automatic login in Yanshan University Campus Network