Physics enabled apple with a 3D arrow hovering over it when player is in range of it?

I currently have an apple blueprint with the apple as the root and the arrow (Static Mesh Component) as a child of the apple. Problem is whenever the apple rolls, the arrow rolls with it instead of remaining above it.

My research has led me towards Attach to Actor, Scene Components, Physics Constraints, and a headache…

How would you structure the apple blueprint (root-wise) and what method would you use to get the static mesh to hover above the apple regardless of the apples orientation in the world?

you should be able to lock the constraints of the arrow in the details side panel

1 Like

Attach it (the arrow mesh, here, a mere debug arrow) with a springarm using Absolute Rotation; its Target Arm Length acts as an offset:

The show / hide can be done with a sphere overlap.

2 Likes

Thank you so much for your reply @Everynone!

It seems to be working however I think something with the spring arm is causing the arrow to disappear as soon as it hits the ground. Notice how it flickers as it hits initially then goes away while in contact with the ground. Any idea on why that would be happening?

Could you show the actor’s component hierarchy?

1 Like

Sure! Take a look…

This looks fine, is there any script that runs when the actor hits the ground?


Out of sheer curiosity, does it flicker if you set the angle to -89 instead?

1 Like

There isn’t any script running for when it contacts the ground, and it looks like it does still flicker when changed to -89.

Take a look at what is happening in the viewport when I lower it to the ground manually.

Perplexing.

  • is the arrow simulating physics? (it should not)
  • does the arrow have collision? (does it need any?)

Also, disable collision probe test on the springarm, there’s a tickbox - Do Collision Test.

1 Like

Oh @Everynone, you are the best!

There is no collision or physics on the arrow, however upon disabling “Do Collision Test” on the spring arm it is working as intended.

Thank you so much for all you do here on the forums. I’ve come across so many posts with your helpful answers that whenever I see your username I know I’m close to a solution. You truly are a community hero here!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.