I want to exactly put my player where i want it be.
Here's some backstory behind my question, i m a beginner right now so sorry if my question is a bit pesky..so i m following this tutorial on udemy where to change a player's position the instructor is just using transfrom.localposition..simple enough right?? but when i m doing it, unity is not exactly copying the components there is always a slight difference between rhs and lhs , here have a look at my code..
Here you can see that i m just using transform.localposition to access the player's parent's localposition which is a child of main camera..(the main camera has a script attached to it which enables it to move in a certain direction)-my character is behind the bottommost white rectangle(have rendered it to mark my positions) here is a screenshot of my workspace- here left marker is the gameobject referred as first_pos_of_player in my code and right marker is the second_pos_of_player but when i m equating them ,its working but there is a slight disparity,as clear in the screenshot above the co-ordinates of left_marker are X=-3.85 Y=1.14 Z=10 but when i press down key to equate my rootplayer's position with the left marker the position of the root player becomes- (have copied it directly from the inspector) X=-3.850005 Y=1.140002 Z=10 see the small disparity but this small disparity just increases ending up with my character flowing into oblivion.. sorry if the question was a bit long but am a beginner at this and could not have found a better way to put this.. but anyways is there a way around this?? should i not use float values altogether?? Pls help me on this..its frustating-
Your answer
Follow this Question
Related Questions
,Call api and wait answer to return (async?) 1 Answer
Vuforia, C# rotating an object to point another object fixing Y Axis 0 Answers
My Unity.exe deleted (Unity 2019.3.11),My Unity.exe was deleted (Unity 2019.3.11) 1 Answer
I tried fixing "Using GUiTexture has been removed, use UI.Image instead" But it wont work 1 Answer
Namespace inside DLL file 0 Answers