Calling set world transform giving different results?
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
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
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?
Any help would be appreciated as I am lost.
asked Sep 23 '15 at 07:44 PM in Blueprint Scripting
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,
Follow this question
Once you sign in you will be able to subscribe for any updates here