I have the skill where my character can go invisible which is ready but enemies can still see the character i want him to be able to not only be hidden from the enemies but awso to be able to go like a ghost through them for the duration of the skill is active. I use Set collision node but i dont know what collision settings should i set up on it and the enemies…i tested random a lot of settings but cant find the right one I either fall through the floor or it is not working to go through enemies and they block me…
If you are using AI Sight for your enemies to see your pawn, then you might be able to Unregister your pawn from the Sight sense for this duration by adding an AI Perception Stimuli Source Component to your pawn and calling Unregister From Sense/Register For Sense
There is a slight chance this won’t work if you have automatic registration of all pawns enabled (which is by default), I haven’t tried. But if it doesn’t work, then you should add
in your DefaultEngine.ini config file. If you do that, you will have to manually add AI Perception Stimuli Source Components to all you pawn classes that should act as stimuli sources, and configure the senses for which they should be enabled. After that, you should be able to register and unregister using those components as you please.
Regarding the collision, you could use SetCollisionResponseToChannel on your pawn’s components, and set the response to Pawn to be Ignore while your skill is active, and block otherwise (if that’s your design)
Yeah ti seems correct, does your enemy pawn have other components attached that are perhaps another type that is blocked by your pawn components? For example does your enemy pawn have any colliding components that are of type WorldStatic/WorldDynamic by any chance? Because these are blocked by default
How did you acctually make that when you go through the characters your third person camera stays the same and is not moving like when you go in some corner and there is a wall next to you and when you rotate the camera it adjust to the wall that is blocking the view to how would normally rotate around the character if no obstacle was there…Don’t know how to explain it but when i go invisible and i try to go through the enemy my camera aways changes when im passing them and adjust and get back to normal… Any idea how to fix it so i can get the same result as in your video ?
There must be some component that is blocking the camera channel, could be on your pawn, or if you have anything attached to the pawn at runtime maybe that has components that block it
yea i just found it the capsule component had another collision settings then the mesh which was on ragdoll profile so there was the camera not ignored and now it works
Hey man im revisiting this as the last time i acctually didnt finish it.
As of now i can go through enemies as a ghost so to say but i am trying to make him real invisible so enemy’s dont see him at all. For now they do attack me when im close to them and they see me in this ghost form…
Anyway i tried to add the AI Perception stimuli source component and then on my skill i added the Unregister from sense but its not working. I awso changed the DefaultEngine.ini and added
[/Script/AIModule.AISense_Sight]
bAutoRegisterAllPawnsAsSources=false
I hope that there is some simple fix for this or maybe i just overlook something somewhere ?
I try to get “see pawns” from the pawn sensing as it seems if i deactivate it directly on the enemy then the enemy is not seeing the player anymore. Unfortunatly its not working when i call this variable on my skill or maybe im setting it wrong dont know…
I’m not sure about how you’ve implemented stuff, but you will have to handle forgetting about the target if it becomes unavailable yourself. I’m not too familiar with the Pawn Sensing Component, my answer was assuming you are using AI Perception Component instead. The AI Perception Component has an event that has data about a sensed target, including if it was sensed or lost
I used only the pawn sensing but i added the AI Perception component as well just to test this. After adding the component i try to Unregister from Sense node as you mentioned but it didnt work for some reason I then awso added the 2 lines of code to the DefaultEngine.ini and still failed. Do you maybe have an idea why this aint working with the ai perception ? And any alternative to it maybe to get the same effect at the end ?
I’ve seen that puting a Cube over the character so he is in the middle of the cube and the cube setting in the collision settings “Visibility” to block seems to get me fully invisible to enemy’s but wierd enough when i remove the Cube and set the same Visibility setting on the character mesh the enemy then again can see the character… Any more ideas what i can try ?
I awso try to ignore or block the visibility on the bp but both didnt work…But that awso dont work