当前位置:网站首页>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 
边栏推荐
- [算法] 剑指offer2 golang 面试题6:排序数组中的两个数字之和
- Lock wait timeout exceeded try restarting transaction
- Itext 7 生成PDF总结
- [算法] 剑指offer2 golang 面试题5:单词长度的最大乘积
- 3月15号 Go 1.18 正式版发布 了解最新特色以及使用方法
- [Chongqing Guangdong education] reference materials for regional analysis and planning of Pingdingshan University
- MySQL error warning: a long semaphore wait
- [算法] 剑指offer2 golang 面试题2:二进制加法
- Implementation of Excel import and export functions
- 基于rtklib源码进行片上移植的思路分享
猜你喜欢

Naive Bayesian theory derivation

Particle system for introduction to unity3d Foundation (attribute introduction + case production of flame particle system)
![[algorithm] sword finger offer2 golang interview question 4: numbers that appear only once](/img/f7/23ffc81ec8e9161c15d863c1a67916.png)
[algorithm] sword finger offer2 golang interview question 4: numbers that appear only once

FairyGUI增益BUFF数值改变的显示

【GNSS数据处理】赫尔默特(helmert)方差分量估计解析及代码实现

Fairygui joystick

Unity3D制作注册登录界面,并实现场景跳转
![[算法] 剑指offer2 golang 面试题3:前n个数字二进制形式中1的个数](/img/64/0f352232359c7d44f12b20a64c7bb4.png)
[算法] 剑指offer2 golang 面试题3:前n个数字二进制形式中1的个数

Wechat applet development experience
![[算法] 剑指offer2 golang 面试题12:左右两边子数组的和相等](/img/11/ee0628a68542236fc641966579a31a.png)
[算法] 剑指offer2 golang 面试题12:左右两边子数组的和相等
随机推荐
There is no red exclamation mark after SVN update
[算法] 剑指offer2 golang 面试题1:整数除法
抗差估计在rtklib的pntpos函数(标准单点定位spp)中的c代码实现
[algorithm] sword finger offer2 golang interview question 12: the sum of the left and right sub arrays is equal
FairyGUI簡單背包的制作
FairyGUI增益BUFF數值改變的顯示
Particle system for introduction to unity3d Foundation (attribute introduction + case production of flame particle system)
FairyGUI摇杆
[algorithm] sword finger offer2 golang interview question 13: sum of numbers of two-dimensional submatrix
3月15号 Go 1.18 正式版发布 了解最新特色以及使用方法
Theoretical derivation of support vector machine
[algorithm] sword finger offer2 golang interview question 5: maximum product of word length
记录:下一不小心写了个递归
Fairygui gain buff value change display
[offer9] implement queues with two stacks
GPS高程拟合抗差中误差的求取代码实现
[Chongqing Guangdong education] Shandong University College Physics reference materials
【GNSS】抗差估计(稳健估计)原理及程序实现
[GNSS data processing] Helmert variance component estimation analysis and code implementation
FairyGUI增益BUFF数值改变的显示