Good day everyone,
i’m having some issues with spawning my actor and making it work after animating its first movement through a Timeline.
I have a BP Actor, a ball, that has a floating pawn movement component updated via tick to constantly move and functions to bounce around that currently all work correctly
I’ve also created a “spawner” BP Actor to put this ball actor in play, i need it to drop the ball in a somewhat realistic manner, thus i created a timeline and animated the “entrance” of the ball in game this way:
Here comes the issue:
if i spawn the ball directly, and use the function “Spawn Default Controller” to make it work it correcly starts moving, however if i do it AFTER the block of code above to animate it and then make it move on its own it just doesnt work.
Another way i’m trying is to destroy the ball that correctly did the animation and then, on the last position of the previous ball, spawn another with its default controller to just make it start moving, but that also doesn’t work:
Hello,I’m a beginner too.hoping to help.
Out of curious,
What does “spawn default controller do”?
Shouldn’t it be the possess node?
And the ball has its own tick movement function.
Meanwhile the spawner is setting the ball’s location.
The location might be double set.
Possess is used when you have a pawn that has to be “possessed” by an AI or Player, this is not the case since the ball is not driven by an AI.
I used spawn default controller because i read from another topic that when you want an Actor which has its own controller to start it’s behaviour on spawn you have to also spawn its controller.
Guess it’s useless since it doesn’t work anyway.
Also on the double setting on the location you might be right, i’m now trying to find a way to make the ball start updating its position AFTER the spawning phase, who knows it might be the issue, maybe.
Thanks for the heads up, i’ll update later.
I think the issue might be the controller. I thought the pawn needs to be possessed in order to work.
If you don’t need to possess the pawn.probably making the ball an actor is better.
The implementation is correct for what you want. There is something else causing the issue. Can you post what your timeline looks like? And make sure the Direction Vector being supplied to the Add Input Vector is not 0.0.0
Hi, as of now i didn’t manage to make the whole system i set up by using an actor instead of a pawn, might it be because i’m using a FloatingPawnMovement Component to move the ball?
Here’s the timeline, it’s a vector with the Z animated to resemble a bounce and X-Y just linearly going from 0 to 1 to use it in the alpha of the lerp
As of now i found a workaround which i don’t know if it’s optimal but at least it works.
I set up my spawner BP with 2 spawn boxes, one for the animated ball and one for the “Real” working one
The code stayed the same, but as soon as the animation, thus the timeline finished i destroy the animated ball and, from the second spawn box, i spawn the real working ball without doing anything more