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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Spawn a camera with a spring arm as parent?

The gist of what I'm trying to do: (FYI: In case you're familiar with the game, I'm trying to recreate the camera system from the Animal Crossing minigame in Nintendoland)

I've got my current project set up for one player to be able to controll two characters on one screen simultaneously. The way I'm currently handling the camera is by spawning a CameraActor in my CharacterController BP following this tutorial.

The camera actor then gets positioned at the average location of the two controlled characters and then out some, always looking at the average location while also maintaining the same distance to it on a perpendicular plane to the imagined line between the two characters. This ensures that the character assigned to the left analog stick of the gamepad always stays on the left side of the screen and vice versa, which is key to making that controll scheme playable at all.

After I had failed to spawn said camera in conjunction with a spring arm component as its parent, I ended up resorting to what little of my high school math was still there and used a simple pythagorean operation to determine the coordinates for the camera to maintain its relative position to both characters.

This worked fine for the time being, but as I'm trying to refine the cameras behaviour more and more it's becoming clear, that a spring arm component and the fact that it rotates around the pivot at the tip of the arm would suit my needs (and lack of programming experience) much better.

So, my question is: Looking at the provided BP screencap below, is there a way I can work with my existing setup and have the camera have a spring arm component?

NB: The part where the camera is spawned is in the small comment box at the lower right of the screencap. The rest is just there in case it might be useful to know what I'm trying to do.

alt text

Chances are, that I'm being terribly impractical and overcomplicating things in my BP. I'm very new to scripting. I'd of course also be thankful for any pointers towards simplifying it. Or how to utilise components of either the player controller BP or the one of the two character BPs for my purposes (I've tried but failed to do so).

Thanks for reading and for your help in advance! :)

Product Version: Not Selected
more ▼

asked Sep 26 '14 at 04:53 PM in Blueprint Scripting

avatar image

1 1 2 3

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Figured it out after trying again today. I actually don't know what went wrong back then.

more ▼

answered Dec 22 '14 at 09:10 PM

avatar image

1 1 2 3

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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