Breakthrough - Full camera rotation and directional imput V
After many and many hours of no progress I finally made an important breakthrough! So very happy.
I got stuck the longest time after having a rotating camera and movement inputs for the player because I taken the two methods from different schools of coding stuff.
Well actually almost everyone write code differently and have tiny difference in results, so when I was trying to mesh toghether the styles and make the directional movement
to be read by the camera system so that no matter where you facing W or Up arrow means foward, S or Down arrow means backward and same goes for left and right.
I digged everywhere around the web and unity forums finding very useful informations but none that made this work.
I learned a lot because I'm still lost in all the new ways Unity differs from Game Maker studio and the naming conventions still don't stuck with me. This all process had an idea going of
making a comparison post on Hive about the practical differences beetwen the engines, for study purpose and practicing on learning to code.
In the end I needed a solution because I want to move on and play with 3d surfaces and level design and the simplest solution was in keeping the camera I had but loose the player movement script I had for the one in the standard Unity assests. That was a real treasure in the end because the Unity standard assets solved the faster diagonal movement too.
I'm still not sure if this much freedom with the camera is too much with it being able to go under the player and make the planes vanish though it give a great vertical view for the curios explorer and for now it hasn't bugged out or got stuck anywhere.
move = (vVector3.forward + hVector3.right).normalized;
this how Unity easily handle this problem with .normalized. I still don't fully get it but it works wonders.
So here we are bouncing around in this new dimension.
Until next time and have a great weekend everybody! :D
▶️ 3Speak
Bittorrent Golden Wallet Prizes
For hive users prizes are distrubuted based on their profile reputation Point. Don't get behind Sign in Now CLICK HERE and claim your Prizes now
Reputation Point based Prizes:
Scam. Do not click the link!
Normalized means the magnitude of the vector is always 1 and the vector then only gives you the direction. This allows you to, for example, multiply it with a speed value of your choice and always know the speed will be the same going in the direction of the vector.
So when you before hade vector forward and right, you can simplify and say it got twice the magnitude and therefore went faster. When you normalize them you get the correct direction, but always with the length of 1.
Awesome it's perfect to get some specific data from the game and use it in another context. Grat expanation 😃
DO NOT FOLLOW any instruction and DO NOT CLICK on any link in the comment!
https://twitter.com/Mproxima1/status/1495055162150432768
The rewards earned on this comment will go directly to the person sharing the post on Twitter as long as they are registered with @poshtoken. Sign up at https://hiveposh.com.
Congratulations @mproxima! You have completed the following achievement on the Hive blockchain and have been rewarded with new badge(s):
Your next target is to reach 83000 upvotes.
You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word
STOP
Check out the last post from @hivebuzz:
Support the HiveBuzz project. Vote for our proposal!