Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

有设置锚点的GObject 在设置旋转后 位置会往右下角偏移 #21

Open
mingxxming opened this issue Jun 26, 2021 · 4 comments

Comments

@mingxxming
Copy link
Contributor

No description provided.

@mingxxming
Copy link
Contributor Author

在编辑器里设置了轴心 并且勾选了 同时作为锚点, 代码调用SetRotation后 位置会往右下角偏移, 偏移量大概是size的大下

@huzhangyang
Copy link

GObject.cpp 233行改为:

DisplayObject->SetRenderTransform(FSlateRenderTransform(Matrix, bPivotAsAnchor ? (Position - Size * Pivot) : Position));

@mingxxming
Copy link
Contributor Author

GObject.cpp 233行改为:

DisplayObject->SetRenderTransform(FSlateRenderTransform(Matrix, bPivotAsAnchor ? (Position - Size * Pivot) : Position));

这个修改是工作的

@xiaoguzhu
Copy link
Member

谢谢分享

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants