Hello everyone, i have a question, i’ve created a blueprint based on custom class which extended from AActor, when i tried use raycast to get calss name, it doesnt see this object, so what should i do?
There are few possibilities for that.
- If i understand correctly, the raycast doesn’t find your object am i right ?
- if it’s that you need to check the collision channel you use for the raycast ie : ECC_Camera, ECC_Visibility, …
- You must check the response for that channel on the specific object you try to raycast.
see the documentation for more details
If you need more infos, help or if i am wrong just tell me, i’m glad to help.
thanks for reply. Yes, you are right. Channel response is blockall, my raycast collision channel is ECC_Visibility
Do you use a simple line or a multiple or a sweep ? Also you mean that your object youre trying to raycast is set to block all on collision channnel property ?
Did you set set a breakpoint to see what the raycast caught ?
Check the FHitResult
Did you catch something ? if yes the Bhit within the FHitresult will be at 1.
ok, thanks man, i solved this problem. My blueprint consists of Skeletal Mesh, so i had to add box collider for collision. so I added this box and put collision type to BlockAll, and now it works.