当前位置:网站首页>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
边栏推荐
- Fairygui character status Popup
- Unity3D制作注册登录界面,并实现场景跳转
- [algorithm] sword finger offer2 golang interview question 13: sum of numbers of two-dimensional submatrix
- 染色法判定二分图
- Game 280 weekly
- [algorithm] sword finger offer2 golang interview question 7: 3 numbers with 0 in the array
- It has been solved by personal practice: MySQL row size too large (> 8126) Changing some columns to TEXT or BLOB or using ROW_ FORMAT
- Easy to use shortcut keys in idea
- [leetcode622] design circular queue
- 第一人称视角的角色移动
猜你喜欢
[算法] 剑指offer2 golang 面试题6:排序数组中的两个数字之和
[algorithm] sword finger offer2 golang interview question 6: sum of two numbers in the sorting array
The port is occupied because the service is not shut down normally
FairyGUI增益BUFF数值改变的显示
[algorithm] sword finger offer2 golang interview question 13: sum of numbers of two-dimensional submatrix
Derivation of logistic regression theory
【GNSS数据处理】赫尔默特(helmert)方差分量估计解析及代码实现
【无标题】
Wechat applet development experience
[算法] 劍指offer2 golang 面試題2:二進制加法
随机推荐
[Chongqing Guangdong education] reference materials for regional analysis and planning of Pingdingshan University
FairyGUI增益BUFF数值改变的显示
Acwing-116 pilot brother
Programming homework: educational administration management system (C language)
Fairygui joystick
NovAtel 板卡OEM617D配置步骤记录
[algorithm] sword finger offer2 golang interview question 10: subarray with sum K
染色法判定二分图
The master of double non planning left the real estate company and became a programmer with an annual salary of 25W. There are too many life choices at the age of 25
[algorithm] sword finger offer2 golang interview question 3: the number of 1 in the binary form of the first n numbers
rtklib单点定位spp使用抗差估计遇到的问题及解决
Theoretical derivation of support vector machine
Fairygui gain buff value change display
IText 7 generate PDF summary
Force buckle 1189 Maximum number of "balloons"
第一人称视角的角色移动
C programming exercise
使用rtknavi进行RT-PPP测试
最短Hamilton路径 (状压DP)
记录:初次cmd启动MySQL拒接访问之解决