samhogan / Minecraft-Unity3D

A basic minecraft clone made with unity in 24 hours
MIT License
814 stars 227 forks source link

movement code #4

Open ghost opened 4 years ago

ghost commented 4 years ago

in this repo, i may want to modify the movement speed to see if there is any phenomenon at a couple million block out, (far lands 2.0?) where can i find the code to modify that?

Sv443 commented 4 years ago

I'm not the dev but here's some variables you can change: https://github.com/samhogan/Minecraft-Unity3D/blob/master/Assets/Scripts/PlayerMovement.cs#L8
As far as I know you have to go to a coordinate greater than 2,147,483,647 to over- / underflow the integer values and make weird stuff happen.

ghost commented 4 years ago

yep, i have the code modded in visual studio IDE and dont know how to load it into unity. my little code knowledge is broken.

bgirard commented 4 years ago

Just go in the editor and change the position of the player object.

DasBlackfur commented 4 years ago

@MangoDevStudio Yes that is also my point finding that line isnt very chalaging but I have almost no experience with loading code into unity so If anywone could tell me pls do it. @bgirard Probably you know how to do it.

DasBlackfur commented 4 years ago

Okay I got it myself and btw at 100000 this happens: grafik

ghost commented 4 years ago

smarter than me :(, but antvenom would be proud

DasBlackfur commented 4 years ago

Hmm I found something else wiered… If you teleport to 100000 this happens. But if you walk to 100000 everything is fine (exept lighting). At About 50000 smooth-lighting breaks. At 80000 hard-lighting is broken so I had to diable lighting completly.

FinnT730 commented 4 years ago

You have to change this line: https://github.com/samhogan/Minecraft-Unity3D/blob/master/Assets/Scripts/PlayerMovement.cs#L8