|
| 18 Jun 2016 12:06 PM |
After like setting a position/rotation of a model like 3000 times, both the position and rotation are like 0.003 off.
How would I fix this issue? |
|
|
| Report Abuse |
|
|
|
| 18 Jun 2016 12:11 PM |
It legitimate scenario would you set PrimaryPartCFrame 3000 times?
|
|
|
| Report Abuse |
|
|
|
| 18 Jun 2016 12:15 PM |
I have an animation script that is constantly doing the same animation every few seconds. It uses wait(), so approximately 30 times a second. Each animation is 100 frames. Leave this script on for only 100 seconds, and the parts are offset. |
|
|
| Report Abuse |
|
|
|
| 18 Jun 2016 12:19 PM |
Try this
local StartPos = model:GetPrimaryPartCFrame()
--After the animation
if model:GetPrimaryPartCFrame ~= StartPos then
end
This will only work if it's some sort of repeating animation, not attached to a char or anything... |
|
|
| Report Abuse |
|
|
|
| 18 Jun 2016 12:24 PM |
The PrimaryPart is constantly on the same position and rotation, as it should be (no offset at all).
The parts in the model that are not the PrimaryPart are offset.
Should I use another method for this? |
|
|
| Report Abuse |
|
|
|
| 18 Jun 2016 12:28 PM |
@OP
Inaccuracy in representing long decimal numbers is just a part of programming. There's no sense in worrying about a tiny bit of offset that people won't even be able to see in the first place. |
|
|
| Report Abuse |
|
|
|
| 18 Jun 2016 12:31 PM |
| I understand, wouldn't mind if it is a small offset, but letting the script run for like 10 minutes, it is offset like at least 1 stud. |
|
|
| Report Abuse |
|
|
|
| 18 Jun 2016 12:32 PM |
| Why do you even need to SetPrimaryPartCFrame in the first place? If that part never moves, then would there be an issue if it's anchored? |
|
|
| Report Abuse |
|
|
|
| 18 Jun 2016 12:34 PM |
| The model moves, also the Primary Part. When it moves back (a lot) you get an offset on the Model. The Primary Part has no weird offset. |
|
|
| Report Abuse |
|
|