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"

Setting gravity vector

From what I see gravity is hard-coded to Z-axis. Is there any way to change it without making nasty hacks? Don't care about blueprint compatibility aswell, it can be only from code.

It has to be one of the worst design decisions.

Product Version: Not Selected
Tags:
more ▼

asked Jun 16 '14 at 10:34 PM in C++ Programming

avatar image

Neomex
76 2 6 12

avatar image Mark James G Jun 17 '14 at 02:45 AM

Well, the design assumes that the world isn't exactly a sphere. You're working with a z-plane and thus a flat world. What you could do is find the center of an object and revolve around that depending on your relative position. I think Rama at one point had some sort of working example of this... give me a moment to find it!

https://www.youtube.com/watch?v=_VFninMa9Nc

There it is. Check it out.

avatar image Neomex Jun 17 '14 at 09:23 AM

But there still won't be gravity for cloth and particles.

avatar image BlueByLiquid Oct 21 '14 at 08:46 PM

anyone ever figure out how to do this for the engine as a whole?

avatar image Mortusnyte Dec 31 '14 at 04:52 AM

Rotate the camera? :P

avatar image BlueByLiquid Jan 03 '15 at 04:55 AM

rotating the camera won't work for a number of reasons and would only work in a very specific case and not well

avatar image MutationDevice May 06 '15 at 02:53 AM

Did you ever find a solution? I'd also like to have spherical gravity...

avatar image Emidee May 06 '15 at 06:00 AM

AFAIR Epic once told they would work on a way to arbitrarily be able to change the gravity vector. I don 't know what's the status though

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

1 answer: sort voted first

Nearly 2 years late but this pull request https://github.com/EpicGames/UnrealEngine/pull/1773 does what you want. UE will hopefully incorporate it within a few months. You need a github account and access to their repo to see it.

Otherwise, without changing the code yourself, you could set all gravity to 0 and apply forces to your objects in the direction you want. This wont rotate characters though.

more ▼

answered Mar 23 '16 at 11:16 AM

avatar image

glazed4444
16 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