Calling set world transform giving different results?

Hello,

I am at a complete loss here, it must be something I’m doing as both methods use the exact same function yet both give different results. So i have a sphere controlled by the user and i’m trying to make it teleport on hitting a box trigger, however the static mesh moves to the correct location but the camera doesn’t follow. If I call the same function from a key press both the camera and sphere move to the correct location. I have no idea what it could be any ideas ?

This is how the component is set up

59931-componentsetup.png

This is the function being called [just set to random place for testing]

This is called from same blueprint as the teleport function and works when called

59933-call1working.png

This is called from another blueprint when the sphere overlaps the box trigger

This is the failed result when calling from the previous image as you can see the spring arm/camera stays (red light is where the sphere was) and the sphere dissapears to the correct location (i have checked and can confirm this).

Yet when calling from a key press it works as expected?

59936-result2notworking.png

Any help would be appreciated as I am lost.

G

Hello gaz99,

It seems like you’re performing an excessive check. Checking the other comp against the sphere will not work, because the other comp is actually whatever collision you have on the sphere. So in order for this to work, you’d have to compare the collision itself (capsule, box, etc), or just eliminate the check entirely, as I have done in my blueprint, which is pictured below. I have used a capsule instead of a box in my example, and my ThirdPersonCharacter is the same as your player, so you’ll have to make the necessary adjustments in your blueprint.This should allow you to get the desired result.

Have a great day,

Sean Flint

I tried setting up as you mentioned but it still produces the same result. I have no idea as the two methods called the same function, but they produce different results

Hello gaz99,

I would like you to try and recreate the scenario in a new project. Rather than using the components that you have created in your current project, use the third person character as the player, and just create a simple box or capsule collision inside of an actor blueprint. This will allow you to see whether there is something wrong with the way the blueprint is being set up, or if there was some setting in your original project that is causing this issue.

I look forward to hearing your results.

Have a great day,

Sean Flint

Hey,

Tried in a blank project and it works as expected so it must be something I’ve done in my project and the way i set up the blueprint. Thanks for the help

Gaz