Can I move An Object On Trigger in C++

Hi, I am wondering if I can Move An Object In C++; I know how to do it in The Tick function, But I Dont Know If I Can Do it in A Custom Function. Can Someone Please Help.

You can still do it in a custom function! All you have to do is have a reference to the actor you want to move and use SetActorLocation/SetActorRotation :slight_smile:

If you’re adding an offset on Tick event for example, you should use DeltaTime!

No problem :wink: if you’re satisfied with the answer, make sure to mark it as correct, otherwise, let me know what other questions you have!

Can I use DeltaTime in the function?

Can I use DeltaTime in the function?

Thank you for helping!

Hello, sorry for asking this late, but I made a function called Move and added DeltaTime to it, and I get an error in .AddDynamic can you help?

Trigger->OnComponentBeginOverlap.AddDynamic(this, &AMove :: Move);