Hi. I’m making 3D game where the camera can be rotated freely, and I want to make something similar to this (this is crazy, you aren’t prepared for it):
(this is prequel to my new 3D game btw)
But yeah. Objects should move in the same way, even if the camera is rotated. This cannot be done with the widgets, because it’s pretty physics based, random, and widgets doesn’t really allow make animations like that (animation can be added with the animated material, but it never starts from the beginning, but from a random point).
I think it could be done somehow with the paper flipbooks, but how can I “attach” 3D place to my viewport? Can this be done with some kind of math, or can I manipulate viewport somehow, that shows two places at once, and that one place is where all that stuff happends?
simulate the actor or do whatever you want with it but keep it hidden from rendering, displaying just the widget that adds its own sophisticated animations on top of the simulation:
things can get uncanny pretty quickly:
In reality these are just 4 rolling balls…
No clue if suitable at all - you’ll be a better judge of whether this is worth exploring / exploiting. Appart from that, I’m confused. Curious about where this goes. Can’t advise on the UE’s paper side of things - not my domain.
Ok. Now I’m confused. What do you mean by “simulating” the actor? Also what is that thing in the middle of the second picture (I’m using UE4 so it looks bit confusing). Also how making animations works with the UMG.WidgetComponent exactly? Doesn’t WidgetComponent just add normal Widget inside the actor to be shown?
Could you do it the other way around?
There’s a 3D GUI Widget component. It lets you place a GUI in the 3D world.
Then you can easily control the camera to do whatever you want.
You can even place multiple GUIs in various parts in the world.
And so is the above, it’s a physically simulating mesh with a widget component attached to it.
It’s an actor with Static Mesh Component (for simulation) whom I gave a long descriptive name - since you’re making a 2d game and want physical simulation, I assumed you’d want entities constrained to a plane - so they do not fly away on the undesired axis.
You can’t do everything (without plugins/digging in Slate) but you can do quite a bit. Some things are more painful than others. Some features are well hidden.
Yes. But you get a couple of benefits. Z is sorted for you based on camera distance. You do not need to track location (but you can). There are caveats, too, ofc. Here it is with the crazy turned off - you can see the mesh and the animation in the widget is not playing.
I’m making 3D game where the camera can be rotated freely
I guess I couldn’t shake the initial impression of what you posted - the previous game. If you’re making a fully 3d game, I’d more seriously consider what I originally posted then.
Now that I checked, the original game only had a couple of animations that had gravity, but maybe those can be recreated with the animations to look like those have gravity. I made that game over 7 years ago, so I remembered that there would have been way more of those.
I have made animations inside the widgets before, but I thought you were talking about the “WidgetComponent”. It doesn’t really have anything inside. Also the first video was bit confusing so I got completely confused, but…
I now managed to recreate first 3 animations with the User Widget. Previously, my problem with the animations inside the widgets was that the animations would always start randomly from the middle. I found out today that it can be fixed with the Material Instances. I also got the animations to randomly change places inside the widget.
I have all 3 animations inside the same widget and the same animation cannot be repeat again, until the previous one has finished, because there are one of each object. I tried to create new animation objects inside the widget on the runtime, but after that the animation still only worked with one of the objects, and the scalings, positions and others should have been set manually.
Of course, you can get doubles if you spawn several widgets at the same time. It doesn’t work quite like the first game, but it works well enough.
Not sure I follow this. Why would that be?You’re free to start, stop, repeat animations, play from a specific time, get finished events, use triggers and repeaters.
You obviosly cannot play 3 instances of the same animation simultenously inside the same object. You’d 3 need instances.
But nothing is stopping you from dynamically spawning 3 native images showing a material and animating them inside the same user widget. The entire thing can be attched to a component, if needed.
Regarding the comp, if you extend it, you get a full graph, variables, functions and so on. It’s just a specialised actor component that can display a widget. So you can have it do a lot of heavy lifting without relying on the the actor it is attached to, or the actor even knowing the component is there.