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"

Cannon rotation

Can't figure out how to rotate the cannon on it's Pitch and Yaw without effecting the Roll. alt text

Product Version: UE 4.8
Tags:
cannonrotate.png (127.9 kB)
more ▼

asked Aug 10 '15 at 03:56 PM in Blueprint Scripting

avatar image

AaronPaulina
79 7 8 9

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

2 answers: sort voted first

Well that was kinda short. According to your image you are adding nothing to roll so what are the results are you getting ? I'd usually go about this by changing Relative rotation and leveraging LERP (finterp) instead of adding deltas...

more ▼

answered Aug 10 '15 at 04:23 PM

avatar image

davek
150 13 8 10

avatar image AaronPaulina Aug 10 '15 at 05:17 PM

http://gfycat.com/UnsungWastefulKoalabear this is what it looks like when i move the mouse around a little. it starts to turn on its side.

avatar image davek Aug 11 '15 at 07:25 AM

Are you super-duper-extra-sure that your axes are set up correctly ? I've seen this stuff before and it kept happening because I erroneously thought my axes will keep the same setup once imported into UE4. Also you didn't share what your functions GetLookUp and GetTurn look like, so maybe there's a logical error there as well.

avatar image AaronPaulina Aug 11 '15 at 08:09 AM

alt text

capture.png (19.9 kB)
avatar image davek Aug 11 '15 at 08:16 AM

I'm talking about the static or skeletal mesh's axes, not axis mappings...

avatar image AaronPaulina Aug 11 '15 at 08:22 AM

Yes, if I remove the getLookup from the AddWorldRotation node the cannon turns side to side. If I remove the getTurn it moves up and down. When added together they change the roll of the object. I believe quaternions are the way to get around things like this but have no idea how to do that in unreal.

avatar image davek Aug 11 '15 at 08:28 AM

This has nothing to do with quaternions. Try using relative rotation instead of world one and double-check your logic inside your functions.

avatar image AaronPaulina Aug 11 '15 at 08:56 AM

It still rolls with relative rotation. The functions you are referring to are just input axis return values from the input manager. No custom functions of any kind.

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

Solved the problem by rotating the pivot and the cannon mesh separately. If you add both rotations to a single component it will mess up due to gimbal lock.

alt text

cannonsolved.png (170.8 kB)
more ▼

answered Aug 11 '15 at 10:08 AM

avatar image

AaronPaulina
79 7 8 9

avatar image davek Aug 11 '15 at 10:22 AM

It's great that you solved it, but next time, so as not to waste people's time, you should really be more informative, the fact your cannon consists of 2 separate pieces is quite a game-changer actually.

(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