How would you move an actor in relation to player position?

I have an issue, I’m fairly new to UE4 and I’m trying to achieve moving each individual hexagon in the scene to move upwards in relation to the players position. The basic principle would be you walk near the hexagons and they would rise up as you near their position.

If anyone has any suggestions what would be the most efficient way of achieving this it would be of much help. I tried looking for anyone with a similar problem but didn’t successfully find anything

Hi, you can do it using blueprints, following these steps will do the trick:

  1. Create a Blueprint from Actor
  2. Add a SphereComponent and configure it to raise overlap events
  3. Add a StaticMeshComponent and assign your hexagon mesh to it
  4. Go to the Blueprint Graph and add overlap begin and end events (ensure you are calling AddLocalOffset to your StaticMeshComponent so you won’t be moving the collision sphere)

Hope it will be a good starting point for you.

Ah thanks, you’ve given me a good basic understanding where to start!

You’re welcome, you may need to implement some animation/smoothing but it was out of the question bounds :wink:

If it works for you please click the checkmark under the up/down vote of my answer for futur traveller who would end up here with a similar issue.

I’ve now given you an upvote :slight_smile: and I shall put this answer to great use, thanks again.