I want to manually create a HitResult object, the same type that I would get from a hit event in Blueprint. Now there is a MakeHitResult BP node, which I thought I could use. However, that node does not allow me to specify all those member variables of the HitResult structure.
What is the correct way to create a HitResult object in BP from various input values?
When you do Create Hit Result, is there a sort of double down arrow at the bottom of the node, \// ? When you click it, it should show all the members.
No, nothing like that. I have updated my original posting with a screenshot.
If you compile and read the warning you will see that it says “Warning Make Hit Result has no property tagged as BlueprintReadWrite. The Node will be removed in a future release.” This tag is needed so that this property can be read or written from a Blueprint. I hope that this information helps.
Make it a great day
Well, I am sorry to say, but frankly it does not help. I understand what you mean, but how can I now create a HitResult object by using various input values?
Could you elaborate on what exactly your end goal will be so that I could have a better understanding of what it is you would like to achieve? If you would like to store a hit result as a variable you could try making your own struct and then set the values from a hit result in it.
Basically I want to supply this HitResult object to he ApplyDamage BP node after a projectile hit. I don’t have this HitResult object though, as we don’t use the hit event of the object, but the overlap event. Now I was looking into faking that HitResult object…
I have written up a request ( UE-25373) and I have submitted it to the developers for further consideration. The make hit result above was the result of a known issue. However, the request I wrote up asks that it be made into what would be a more traditional “Make” node (pins on the left and hit result on the right). I will provide updates with any pertinent information as it becomes available. If I understood your needs correctly I would go with my previous suggestion of making your own struct with variable types that match that of the hit result and use that struct for passing, comparing ect. information.
Make it a great day
Thanks, but I am afraid your suggested workaround would not solve my problem, as I cannot pass a custom struct into the ApplyDamage BP node
After taking another look into this was able to see what it is that you are talking about. However, the request that was submitted to the developers should cover this issue in the case that the developers decide to implement the feature.