Download

Need Help with Problem : Set Relative Location and components

Hey folks, so I have an issue where I am timelining an actor 100 units up, then trigger a simulate physics to let it fall down after a while. It works great but for some reason when i simulate it in editor it seems to display fine BUT when i test it in game, my gate disappears and spawns somewhere on top.

Here is the code.

and here is the bp in action

SIMULATION INSIDE BP EDITOR (works as intended here): Screen capture - b291a292511befe810a02bc41f0727d4 - Gyazo

Placed Actor: Screen capture - 212d1d68096ef103aa47a96d54c1c6bf - Gyazo

If someone knows why this is happening let me know as I am stuck :/.

I had another set up: Screenshot - 4786d24535844dc79549acb82c0298d6 - Gyazo

the problem with this set up was that when recalling the event via a input action, it wouldnt do the action again but for some reason teleport about -100 units below ground for some weird reason.

If you know the problem to any of this please feel free to reach out as I appreciate it

Both your BPs have the same problem, you doing the second part of the code ( the drop ) on the update line of the timeline! This means you’re setting physics every frame! :slight_smile:

You need to take this bit:

bit.JPG

and put it here:

here.JPG

hey, thank you so much for your help. However, I still have the problem that if i recall the event the gate disappears… I press U and it fires off as intended, however pressing U again after the execution makes it disappear. In some approachs below the ground and in some into nothingness. I cant figure out why its doing that unfortunately.

https://gyazo.com/5b03cd5678c64647ea577ab4d83807ac.png

https://gyazo.com/5b03cd5678c64647ea577ab4d83807ac

One idea is that maybe you’re pressing U before the physics is turned off.

The other is that maybe you’re having problems with collision, once physics is set, things can fly all over the place. The typical way to animate a gate would be timeline all the way, including downwards… :wink:

the thing is i want the player to be able to stuck things under it and effectively crawl under :slight_smile: any idea what i could do to make it work?

Once it has physics on, anything it touches could send it flying as you see.

One way would be to use custom collision channels. So make the gate and the player’s block to have the same channel. Here’s some about custom channels:
https://youtube.com/watch?v=QQvHZLB4CTU
Another way is to lower it with the timeline, but also have an overlap volume on the ground which when overlapped by the player’s block, can stop the timeline at an appropriate point.

what I dont get is that I am setting the location once i disable simulate physics again am I not? so when i move it up again, I dont really get why its behaving like that as I am just moving a non simulating mesh.

I think you’re hitting the U before physics is turn off?

nope, im hitting it after i disable it again. Thats the thing I am confused about.

Hmmm, no idea I’m afraid

thanks for trying though, appreciate it :slight_smile: