当前位置:网站首页>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 
边栏推荐
- In 2020, the average salary of IT industry exceeded 170000, ranking first
- [algorithm] sword finger offer2 golang interview question 4: numbers that appear only once
- 闇の連鎖(LCA+树上差分)
- Solution to the problem of automatic login in Yanshan University Campus Network
- [算法] 剑指offer2 golang 面试题7:数组中和为0的3个数字
- (the first set of course design) sub task 1-5 317 (100 points) (dijkstra: heavy edge self loop)
- [GNSS] robust estimation (robust estimation) principle and program implementation
- FairyGUI按钮动效的混用
- Office prompts that your license is not genuine pop-up box solution
- [算法] 剑指offer2 golang 面试题8:和大于或等于k的最短子数组
猜你喜欢
![[algorithm] sword finger offer2 golang interview question 1: integer division](/img/e6/f17135207b3540ec58e5a9eed54220.png)
[algorithm] sword finger offer2 golang interview question 1: integer division

Office提示您的许可证不是正版弹框解决

The port is occupied because the service is not shut down normally
![[algorithm] sword finger offer2 golang interview question 10: subarray with sum K](/img/63/7422489d09a64ec9f0e79378761bf1.png)
[algorithm] sword finger offer2 golang interview question 10: subarray with sum K

(core focus of software engineering review) Chapter V detailed design exercises

抗差估计在rtklib的pntpos函数(标准单点定位spp)中的c代码实现

FairyGUI条子家族(滚动条,滑动条,进度条)

闇の連鎖(LCA+树上差分)

Unity3d makes the registration login interface and realizes the scene jump

Liste des boucles de l'interface graphique de défaillance
随机推荐
Combination of fairygui check box and progress bar
Acwing-116 pilot brother
Code example of MATLAB reading GNSS observation value o file
341. Flatten nested list iterator
Wechat applet development experience
Usage differences between isempty and isblank
[GNSS data processing] Helmert variance component estimation analysis and code implementation
Naive Bayesian theory derivation
Theoretical derivation of support vector machine
(the first set of course design) 1-4 message passing interface (100 points) (simulation: thread)
Derivation of logistic regression theory
记录:动态Web项目servlet访问数据库404错误之解决
Knowledge system of digital IT practitioners | software development methods -- agile
[rtklib 2.4.3 B34] version update introduction I
[algorithme] swordfinger offer2 golang question d'entrevue 2: addition binaire
Database table splitting strategy
Design and implementation of general interface open platform - (39) simple and crude implementation of API services
记录:Navicat Premium初次无法连接数据库MySQL之解决
Particle system for introduction to unity3d Foundation (attribute introduction + case production of flame particle system)
Unity3D基础入门之粒子系统(属性介绍+火焰粒子系统案例制作)