How do i get a character to interact with an object?
I'm trying to get a character to interact with a specific object by clicking on it and it causing a reaction. I found a tutorials to start out getting characters to interact in general and it had me draw up this blueprint.
I set the draw debug type so i could see if the lines were working whenever i ran it but it doesn't show any lines tracing back to my character when i click. A small side note i did compile this the screen shot was just taken before hand after trying this on a fresh template which also didn't work. What I'm trying to do in the long run is i have a bookcase set up that when the player clicks a certain book it moves the bookcase to reveal a secret passage. Both the book and the book case are static meshes idk if that matters.
Do it as per my screenshot below.
You weren't far off.
I understand the reason for doing it this way, its because you can point at the object you want to interact with, instead of overlapping and triggering every object on the shelf. basically, you did a +0 on the forward vector, instead of a X (insert range here) In my example below, it only picks up objects within 2 meters.
answered Aug 15 '15 at 07:29 AM
Seems like a complicated way to do it.
You should handle the interaction with the books inside your Book actor.
Put a box/sphere collision around the book, when the player StartOverlap this collision, Enable Input on the actor. Then you can handle your OnClick Event on the mesh (not the collision). Finally when the player EndOverlap the collision, Disable Input on the actor.
I've never really worked with Clicks so you might need to make sure clicks are enabled in your PlayerController.
answered Aug 15 '15 at 06:14 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here