Component disappear ?!

Hi Guys

i have a problem that when i spawn an actor and attach it to a socket in my character’ skeletal mesh it works fine but when i detach it . it disappear.

in my case i’m trying to spawn an arrow when i press the right mouse button it spawn the arrow and when i release it the arrow takes off, but when i release it it disappears .

What’s the speed of your arrow when you release it from the skeletal mesh?

Try settings the arrow’s location and rotation to the socket’s location and rotation after you release it.

What do you want the arrow to do when you release it?

i thought about that so i set the initial speed to be a low number (10) but still when i release it it just disappear

i created a ray cast from my camera to a desired point i want my arrow to follow the ray

So when you release the right mouse button the arrow should head in the direction of your camera’s ray cast?

Yes exactly

ok so i changed the transform rules from keep relative to world

now it doesn’t disappear but also wont move .

here’s a picture of the detach

239802-capture.png

i’m using a projectile movement component

i have the initial speed and max speed as 100

when i spawn it i set the velocity to be 0 so it doesn’t move and when i release it .
i set the velocity of x back to 1 so it moves the problem is that it doesn’t move.

Okay.

How are you detaching the arrow? What are the detachment transform rules? Can you take a screenshot of the blueprint that handles this?

Okay, that’s a step forward. Are you applying any kind of force/velocity after the release? Manually moving the location each tick?

Does your projectile movement component have the arrow component selected?

Can I see the blueprint for where you are setting up the projectile movement component and the velocity change?

Also keep in mind, 1 is a very small value. It would take a while to notice the movement.

You can do that by taking the direction of the raycast (normalized), multiple it by the speed of your projectile component’s speed then use that to set the projectile’s velocity.

your right 1 is too small
i managed to make it moves the only thing remaining is to make it follow my raycast direction.

is this what you mean ?

it was the first thing i have tried .
the arrow moves parallel to the ray cast .
i want it to move to the hit end so the arrow and the line trace meet at the end

Give this a try.

Ah, I thought they started from a similar location. If that’s the case create a vector by subtracting (EndLocation - ArrowLocation). Normalize that vector.

Then multiple it by the speed and set the velocity.