I’m wondering how you would make an enemy that jumps up in a random direction and that’s it. Can be completely physics-based, basically I just need a physics mesh that applies a force upward + random angle but the model stays upright.
I’m a newbie to unreal and I’m not sure how to do this.
Enemy I want to jump: Screenshot by Lightshot
Hi,
Unreal has a Character Class, which is exactly what you need.
It has a Movement Component, which lets you set up jump velocity among many other things.
It will stay upright, to be more precise, a Collision Capsule (it is the root component) will stay upright. Your character model will be good fit, as it’s shape also is quite vertical.
It is not only for Player Characters, it can be “possessed” by an AI Controller, that’s what you want for the enemy.
It is a bit complex, but i hope this gets you startet.
Recommended reads.
This video series will give you a good understanding of how the Character Class works: BP 3rd Person Game: Introduction | 01 | v4.8 Tutorial Series | Unreal Engine - YouTube
If you add physics to the Character (for example with “Add Impulse” or “Add Force”) make sure you apply it to the Character Movement Component. The Collision Capsule and Character Mesh themselves do not simulate physics at all.
This should give you a good start and then on AI for enemy behavior there is a lot on youtube, easy to follow as they usually also use the Character Class.
Cheers!
This was a pretty essential feature I didn’t really know about, Thanks!