x

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"

Locking Camera movement to only the X axis

I am creating a 2D platformer-esk game; However, the character can jump , which moves the Camera on the Y axis which I do not want, How would I go about moving the Camera on the X Axis regardless of player's Y and Z position?

Product Version: Not Selected
Tags:
more ▼

asked Jun 18 '14 at 11:38 PM in Blueprint Scripting

avatar image

TylerNocks
1 1 2 2

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

1 answer: sort voted first

You might want to attach the camera directly to the character mesh without a spring arm in between. Setup the proper Z and Y values in the camera properties. Update the X axis of camera on the Tick function of the character.

But keep in mind that this sometimes result in camera getting blocked by other objects. To avoid this, you might want do do a trace from mesh to camera and using the hit-info, relocate the camera. But if your level design allows you to make sure that the camera is never blocked (like in Mario games), you dont need to do this.

more ▼

answered Jun 19 '14 at 05:38 AM

avatar image

mindfane
3.4k 154 51 271

avatar image TylerNocks Jun 19 '14 at 05:45 AM

Great Idea!

avatar image TylerNocks Jun 19 '14 at 05:45 AM

Thank You!

avatar image mindfane Jun 19 '14 at 07:32 AM

Make sure that the Camera's position is given in Absolute values (not relative). You can switch by clicking on the label (ie click on "position' label in properties panel)

avatar image mindfane Jun 20 '14 at 06:30 AM

Have you made any progress, is the issue solved?

avatar image TylerNocks Jun 20 '14 at 07:12 AM

It did not, but it was a good learning project

avatar image mindfane Jun 20 '14 at 10:26 AM

Why did it not work? I you need any further help, let me know

avatar image TylerNocks Jun 20 '14 at 03:05 PM

nah, I'm good, thank you though

avatar image bunglebonse Oct 23 '16 at 09:13 PM

Well if you managed to figure it out could you please share how you did it, I am having the same issue

(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