英文:
How to flip gravity and the player in Roblox?
问题
有人知道我怎么在Roblox中翻转重力吗?不仅仅是重力本身,我希望玩家也能翻转,这样他们就可以在天花板上行走,而不仅仅是漂浮。我试图找到如何做到这一点,但没有找到答案。
有人可以帮我吗?谢谢!
英文:
Does anyone know a way I could flip gravity in Roblox? Like not just gravity itself I want the one player to flip too so they can walk on the ceiling and not just float up. I tried to find how to do it but there was no answer.
Can someone help me with it please?
答案1
得分: 1
考虑通过将世界相机轴旋转180度,然后将所有的BaseItems绕它们的Y轴旋转来实现“重力翻转”。
类似于这样:
local rotation = CFrame.Angles(0, math.rad(180), 0)
game.Workspace.CurrentCamera.CFrame = game.Workspace.CurrentCamera.CFrame * rotation
希望这对你有帮助!
英文:
Consider achieving the "gravity flip" by rotating the World Camera Axis by 180 degrees and then rotating all BaseItems by their Y-axis.
Something like this:
local rotation = CFrame.Angles(0, math.rad(180), 0)
game.Workspace.CurrentCamera.CFrame = game.Workspace.CurrentCamera.CFrame * rotation
Hope this helps!
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论