I experience a weird behavior with one of my actors.
The actor has basically the following components:
Scene Root
Mesh
During simulation all is fine. I basically apply some local rotations to the mesh. During runtime thought all of a sudden the mesh component is on the same level as the root component, without me doing it activly.
So as soon as I start the game the components are like this:
Scene Root
Mesh
The effect is that any changes in rotation to the actor it self the mesh stays fixed. Which makes sense because it is not attached to the root anymore.
I am really at a loss here.
At some point I had a physics constraint in the actor to physically manipulate the mesh, but all in local space and it also did work at some point, couple of hours later it broke. Also removing the constraint again entirely does not solve it.
Has anyone experienced something like that and can point me into a direction what to look at?
Hey there @conscienc3! Sounds like it might be that when an object has simulated physics on, it immediately detaches from whatever root is above it and becomes it’s own root. Are you simulating physics on the mesh?
Ah yes that sounds plausible. Yes I have simulate physics enabled on the mesh because I played around with physics movements with the constraint … Nice thank you very much for your quick response. I think I will try to find then another way to create a random spin motion.
Do you require physics like movement or will general rotations do? Because if it’s just standard rotations, you can rotate them relative to their parent directly if you’d prefer.
Yeah I want to have random rotation and I found the solution to ‘simulate’ physics with a constraint acting as a motor quite nice. With the ‘Rinterp To’ node I get the rotation, but this would not be random in the sense like: Spin in this ‘direction’ randomly. Or are there other possibilities?
I am playing currently around with reattaching the component, but I am not sure if this is a good solution.
It depends on what you mean by randomly, you can handle the direction randomness yourself directly in BP, how long it rotates, where it stops, etc purely in BP. I always prefer doing my own rotations to allowing physics handle it due to the controllable nature. What’s your use case? I could probably write you a little starter that gets you in that direction, unless you want to stick to phsyics rotations, as I know some games are really physics based.