当前位置:网站首页>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 面试题3:前n个数字二进制形式中1的个数](/img/64/0f352232359c7d44f12b20a64c7bb4.png)
[算法] 剑指offer2 golang 面试题3:前n个数字二进制形式中1的个数

FairyGUI简单背包的制作

Mysql database reports an error: row size too large (> 8126) Changing some columns to TEXT or BLOB or using ROW_ FORMAT=DY
![[dry goods] cycle slip detection of suggestions to improve the fixed rate of RTK ambiguity](/img/9d/7284c1399964d3fb48886f12e4941c.jpg)
[dry goods] cycle slip detection of suggestions to improve the fixed rate of RTK ambiguity

Idea problem record

C code implementation of robust estimation in rtklib's pntpos function (standard single point positioning spp)

MySQL shutdown is slow

Unity scene jump and exit
![[算法] 剑指offer2 golang 面试题12:左右两边子数组的和相等](/img/11/ee0628a68542236fc641966579a31a.png)
[算法] 剑指offer2 golang 面试题12:左右两边子数组的和相等

Unity3D基础入门之粒子系统(属性介绍+火焰粒子系统案例制作)
随机推荐
堆排序【手写小根堆】
染色法判定二分图
Mixed use of fairygui button dynamics
Detailed explanation of balanced binary tree is easy to understand
idea中好用的快捷键
[Chongqing Guangdong education] reference materials for regional analysis and planning of Pingdingshan University
How to improve the deletion speed of sequential class containers?
[algorithm] sword finger offer2 golang interview question 10: subarray with sum K
C programming exercise
Fairygui joystick
1041 be unique (20 points (s)) (hash: find the first number that occurs once)
WSL common commands
Unity3d, Alibaba cloud server, platform configuration
idea问题记录
Compile GDAL source code with nmake (win10, vs2022)
Compilation principle: preprocessing of source program and design and implementation of lexical analysis program (including code)
【无标题】
Matlab读取GNSS 观测值o文件代码示例
基于rtklib源码进行片上移植的思路分享
Idea problem record