Hello, I want to make a spaceship shooting game, where the spaceship has 2 pods that move with the player, but they lag and delayed behind player movements, so you can manipulate how the bullet patterns look like.
I don’t want it to just snap, but move in a circle and cross to the other side if you move from left to right, so they flip or rotate at the centre of the ship
I want the pods that follow the player to shoot the opposite directions the players moves towards, so the pods rotate towards right to shoot when the player moves left.
I already have the shooting, but no idea how to make the pods lag and delay movement and move like that.
I use blueprints on unreal engine version 4.26 but can use newer versions too if I have to.
Here’s a picture if my text was not that clear:
Cool pics
Can the pods collide with the ship / each other?
I was thinking they would not collide with the ship or each other to have less issues, so the aim is more precise and easier to control, but hitboxes could work too
reversing them from facing up towards down, when going straight to one direction would be like this
https://imgur.com/y5V7zZi
what sort of things should I be looking for to make something like this?
- the very first thing that comes to mind is a Physics Constraint:
It connects rigid bodies with a configurable tether, can be made elastic. It’s pretty involved, actually, support motors and all. Here’s my 60s attempt:
That’d need more work ;p. The visualisation should made with particles, surely.
- there are springs:
Think of these as of simplified PIDs, they’re pretty undocumented so you’d need to crack it. The idea would be to drive a dummy vector behind the ship and have the spring take the pod there.
- in UE5, I’d immediately zone in on the new Physics Control - still experimental but already incredible.
Not sure if any of the above are great choices. There’s also the matter of orientation and keeping things simple. Chances are there’s something obvious/straightforward I’m missing. I’ll have a think.
- here’s something out of the unorthodox box:
The pods are attached with a springarm allowing for a liberal amount of lag: