Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How to change cameras and controls when interacting with an object?

Hello everyone !

I've been trying to make a class bluprint for a deus ex type keypad, for training purposes...but I got stuck when trying to actually interact with the thing..

I would like to change the camera so it focuses on the object itself, so I tried various methods, including that https://answers.unrealengine.com/questions/39116/switching-between-multiple-cameras-in-blueprints.html but the Set view node is not even present in my actor class BP, I only saw it in a character BP (maybe I need to script that in the character and reference it in the object though ...).

I also want to pause the character when I'm interacting with the keypad and be able to punch in codes and stick a user interface on it...but still haven't found answers about that either.

Has anyone ever tackled this type of interactive objects and could share some tips and tricks ?

Thank you !

Product Version: Not Selected
more ▼

asked Oct 30 '14 at 11:51 PM in Blueprint Scripting

avatar image

6 1 2 2

avatar image Moutrave Nov 01 '14 at 09:35 PM

wow cool thanks for your answer i'll try this today ! :)

avatar image Moutrave Nov 02 '14 at 03:52 PM

Hey I've been fiddling again with the anim BP of my keypad...I had made it so it had 4 states (closed; opening to open, etc), and set the variables properly and all. Problem is : I haven't found a way to use that state machine properly...so I resorted to a simple "play anim" in the actual actor BP of the keypad...which I guess is kind of a failure. I've looped all the unreal videos regarding character animation but haven't found my answer there, so my question now is : is there a way to actually control the states in the anim BP inside of the keypad bluprint ? Ideally I wanted to set the starting state; change de state manually via script, link an input event "On interacted" in the the anim BP's eventgraph...none of these possibilities were available, so i got pretty must lost :) it's probably not how it works there?

If you have some infos about this, I'd appreciate that a lot :) thanks ! I'll keep digging on my side, your first solution Omnicypher is very interesting already :)

avatar image Moutrave Nov 02 '14 at 07:14 PM

Does the keypad itself needs to be a character BP ? It's still an actor BP right and the set view target with blend does not accept the camera component from the BP itself :( I guess it would only work in a level BP; which is not reusable so not really what i want...but from what you said I guess I should consider the keypad as part of the character or a separate character?

avatar image Moutrave Nov 02 '14 at 09:13 PM

I've managed to set the viewpoint to the keypad by changing my hierarchy (camera component is now the root so i can do a reference to self as indicated by this thread https://answers.unrealengine.com/questions/30969/how-do-i-change-main-camera-to-blueprint-camera.html) . As I commented there, I find this strange that swapping cameras is not ..simpler? Well anyway, i'm just getting started :) someday this might make sense

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

to pause the character, use setCinematicMode().

to set the camera up, inside the pickup, you can cast from the overlapped actor to a pawn, then get its controller, cast it to your custom player controller, and dragging from a player controller node should give you access to setViewTargetFromBlend().

if you make a custom movement component for your character, you can add a custom movement state. instead of walking, swimming, or flying, this movement state could be called "keypadding", and it would be used to connect input events to blend nodes in the character's animBlueprint.

more ▼

answered Nov 01 '14 at 08:15 AM

avatar image

9.5k 317 204 449

avatar image LitStudio Nov 01 '14 at 11:18 PM

Can you post a screenshot? I get lost in how to setup the camera...

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question