filmov
tv
What happens when you go TOO FAR?
Показать описание
👍 Learn to make awesome games step-by-step from start to finish.
🔴 RELATED VIDEOS 🔴
💬 Do you know what is going on in this video? Such a strange bug where a normal looking Sphere suddenly becomes all jittery and messed up.
The answer: Floating point precision.
Floats have a limited number of digits, so if you position an object in a huge position, it won't have enough space for many digits after the decimal point, they will be forced to round up or down. Meaning all the vertices on the sphere won't be able to go to their exact position, so they start jumping up and down as the value is being rounded.
One fix to this problem is a Floating Origin Point. This is where you can keep track of the player position, and if the player is too far from the origin you teleport them and the entire world back near the origin. As long as the relative offsets remain the same it won't have a visual difference but will help solve this issue.
📝 Some Links are Affiliate links which means it costs the same to you and I get a nice commission.
🌍 Get Code Monkey on Steam!
👍 Interactive Tutorials, Complete Games and More!
If you have any questions post them in the comments and I'll do my best to answer them.
See you next time!
#gamedev
--------------------------------------------------------------------
Hello and Welcome!
I'm your Code Monkey and here you will learn everything about Game Development in Unity using C#.
I've been developing games for several years with 8 published games on Steam and now I'm sharing my knowledge to help you on your own game development journey.
I do Unity Tutorials on just about every topic, Unity Tutorials for Beginners and Unity Tutorials for Advanced users.
--------------------------------------------------------------------
🔴 RELATED VIDEOS 🔴
💬 Do you know what is going on in this video? Such a strange bug where a normal looking Sphere suddenly becomes all jittery and messed up.
The answer: Floating point precision.
Floats have a limited number of digits, so if you position an object in a huge position, it won't have enough space for many digits after the decimal point, they will be forced to round up or down. Meaning all the vertices on the sphere won't be able to go to their exact position, so they start jumping up and down as the value is being rounded.
One fix to this problem is a Floating Origin Point. This is where you can keep track of the player position, and if the player is too far from the origin you teleport them and the entire world back near the origin. As long as the relative offsets remain the same it won't have a visual difference but will help solve this issue.
📝 Some Links are Affiliate links which means it costs the same to you and I get a nice commission.
🌍 Get Code Monkey on Steam!
👍 Interactive Tutorials, Complete Games and More!
If you have any questions post them in the comments and I'll do my best to answer them.
See you next time!
#gamedev
--------------------------------------------------------------------
Hello and Welcome!
I'm your Code Monkey and here you will learn everything about Game Development in Unity using C#.
I've been developing games for several years with 8 published games on Steam and now I'm sharing my knowledge to help you on your own game development journey.
I do Unity Tutorials on just about every topic, Unity Tutorials for Beginners and Unity Tutorials for Advanced users.
--------------------------------------------------------------------
Комментарии