my actor in the window detail pannel shows the relative location is all integer,but when i call the print in blueprint ,is shows some difference ,and the number with decimal,why it happend ,i juset want to read the right value in the detail pannel ,and save it to a variable,any one know have the same issue?
The location number in detail panel is a vector of 3 floats. If you are concern with decimals just save them as integer.
Sometimes a float of whole number like 120.0 would show up as something like 119.9997… Close to the original number, it’s how some computer hardware handles float. Actually doesn’t effect the actual math value/calculation.
but the number beteween detail pannel and print are far away difference, my vector x in detail pannel is 120 , prints: 110.929. it is a large gap
Check the hierarchy of scene objects within the Blueprint. The relative location to parent will be inherented.
SceneRoot is parent to A
A is parent to B
SceneRoot = (0,0,0)
A.Location = (-10,0,0)
B.Location = (120,0,0)
B is (110,0,0) relative to SceneRoot