hello there,
I’m new on unreal, practicing some course and I started to have issue with physics…
I can’t understand why I can’t move any movable object in the viewport with physics enabled when I start simulating the game
the object is set to moveable, and it work when I launch the game, but with physics enabled, it doesn’t work anymore.
Hey there @L.Dkian! Welcome to the community! So to answer your question with certainty we’d have to see how you’re moving objects if it’s by script, or if you mean it’s not reacting physically at all to anything anymore we’ll need to see details on both interacting objects.
If it’s scripts that are failing and they are on the physically simulated object it could be one of two things. Using translation style movements isn’t preferred on physically simulated objects, as they tend to interact poorly with the physics system. Second would be if your physically simulated objects aren’t the root object, they immediately detach from their parent. So any logic that was attached to the previous root is now not going to effect the physics object.
general rule of thumb. the object needs to have a collision component as it’s root element.
If that’s true, and in the latest version you can no longer access the gizmo for the object in PIE, then it’s probably a bug. I doubt that would be the case though, since it’s been a long-standing feature of the editor itself…
With that in mind. Once you move the gyzmo manually after the simulation has started the position of the gyzmo has always been a little buggy.
hi
I try to move the object with physics enabled (with collision) directly from the viewport with the gizmo, the gizmo is visible, but if I try rotation or translation, the object doesn’t move
and I’m not using any script.
Are you referencing the blueprint viewport? Because if it is a root component in the hierarchy the gizmo shouldn’t exist as MH mentioned. The in game viewport gizmo has some idiosyncrasies moving around physically simulated objects, as it uses the same script to move objects in location directly. It should still move barring external factors.
Default effect of moving a physically simulated object in simulation:
I mean the game viewport
I’ve uploaded a video of my problem, it should be more explicit : 2022 12 19 10 42 27 - YouTube
the gif is typically what I want to do (and be able to record the movement with the take recorder)
Ahhh that is odd, it doesn’t seem constrained by anything, it should react as usual. It could be caused by the object sleeping, but I thought the translation would wake it regardless. Drop a copy of that book out of the air and verify it’s simulating, then attempt to move it preferably before it goes to sleep and that might give us some insight there.
Also I’ve never seen the automass give an object an explicitly 0 mass, try to manually set the mass of the object as well, something like .01 at the minimum.
Let me know how that goes!
setting the mass manually to 0.01 doesn’t change anything
then I dropped a book in the air, launch the simulation, and yes the book fall and I can move it while he falling, but after the fall, I’m not able to move it anymore…
I noticed, if it help, the book can be pushed from the desk with another moveable object (without physics enabled)
So it could have something to do with it falling asleep considering it works until then, but it’s still quite odd as in my test scene moving it with the gizmo does wake the object immediately but there could be something else going on. Let’s test the sleep theory before moving on. Create a new physics material, you could call it no sleep and give it these settings. Apply it to one copy of the book and have another without it. Drop them both from height, wait till they stop then try to move them again. If the one with this physical material moves, it’s sleep related. If not, back to the drawing board!
okay it work, the object with the “no-sleep” physics material can be moved now
it kinda frustating, the course I follow never mentionned that, and it should work without it, according to the course
It absolutely should, as in my environment it’s working perfectly. It could be that your ground objects aren’t triggering hits/physics updates for the book so it stays asleep when you try to move it. This is definitely not intended. Warning about using this NoSleep physics asset, only use it on objects you want to not be able to sleep at all (very sparingly, likely only for your recording if possible). Any other objects you can set them to the “Sensitive” physics family and it should do the job in case impulses around them are working at all.
I’m not really sure about the ground object… the asset are from the course and I’m a total begginer on unreal…
I tried to create a new basic level, and reproduce what I want to do with only one static mesh, and I still can’t move it…
No worries! What engine version are you using? Looks like either 5.0.3 or 5.1. I’m going to play around a bit to see if I could replicate the issue in the meantime.
many thanks for your help
yes I’m using the unreal version 5.0.3
If you can (there arent any copyright issues) consider packing the project in a zip to share, so that maybe @SupportiveEntity can file a bug report.
Assuming ofc, this is due to some setting being toggled since we can’t reproduct it…
hi there,
well the files is from a linkedin learning, I’m not sure if I can share it wit hyou… (also the zip file is more than 1GB
but I try the same thing on a empty scene, with a basic cube static mesh, and I still have the same problem