当前位置:网站首页>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
边栏推荐
- 微信小程序开发心得
- Problems and solutions of robust estimation in rtklib single point location spp
- Combination of fairygui check box and progress bar
- Naive Bayesian theory derivation
- [算法] 劍指offer2 golang 面試題2:二進制加法
- The service robots that have been hyped by capital and the Winter Olympics are not just a flash in the pan
- Compile GDAL source code with nmake (win10, vs2022)
- Acwing-116 pilot brother
- [algorithm] sword finger offer2 golang interview question 10: subarray with sum K
- [算法] 剑指offer2 golang 面试题7:数组中和为0的3个数字
猜你喜欢
Lock wait timeout exceeded try restarting transaction
编辑距离(多源BFS)
[algorithm] sword finger offer2 golang interview question 5: maximum product of word length
Unity场景跳转及退出
C code implementation of robust estimation in rtklib's pntpos function (standard single point positioning spp)
FairyGUI按钮动效的混用
[algorithm] sword finger offer2 golang interview question 13: sum of numbers of two-dimensional submatrix
idea中导包方法
[算法] 剑指offer2 golang 面试题12:左右两边子数组的和相等
[algorithm] sword finger offer2 golang interview question 4: numbers that appear only once
随机推荐
rtklib单点定位spp使用抗差估计遇到的问题及解决
[算法] 劍指offer2 golang 面試題2:二進制加法
Naive Bayesian theory derivation
Basic DOS commands
Teach you to release a DeNO module hand in hand
Code example of MATLAB reading GNSS observation value o file
FairyGUI条子家族(滚动条,滑动条,进度条)
On March 15, the official version of go 1.18 was released to learn about the latest features and usage
Unity场景跳转及退出
Knowledge system of digital IT practitioners | software development methods -- agile
雇佣收银员【差分约束】
Unity3D制作注册登录界面,并实现场景跳转
wsl常用命令
Mysql database index
Prove the time complexity of heap sorting
[untitled]
RTKLIB: demo5 b34f.1 vs b33
(课设第一套)1-4 消息传递接口 (100 分)(模拟:线程)
Mixed use of fairygui button dynamics
Theoretical derivation of support vector machine