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"

Add Torque in Local Space

How can I add torque to an actor in local space in Blueprint?

Product Version: Not Selected
Tags:
more ▼

asked Apr 06 '14 at 07:19 PM in Blueprint Scripting

3DMoss gravatar image

3DMoss
112 8 15 227

steadiworkz gravatar image steadiworkz Oct 14 '14 at 08:16 PM

Would be nice to have an Add Relative Torque option ?

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

6 answers: sort voted first

I figured it out. I needed to use Transform Direction function to convert local space to world space.

more ▼

answered Apr 06 '14 at 08:21 PM

3DMoss gravatar image

3DMoss
112 8 15 227

steadiworkz gravatar image steadiworkz Oct 14 '14 at 03:32 PM

do you mean convert world to local space ?

Burnrate gravatar image Burnrate Nov 05 '15 at 06:14 PM

Do you have an example?

Podgyhodgy gravatar image Podgyhodgy May 03 '17 at 05:03 PM

Example posted below

accountconnor gravatar image accountconnor Aug 11 '16 at 10:13 PM

some code would be nice

Podgyhodgy gravatar image Podgyhodgy May 03 '17 at 05:04 PM

Example posted below

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

answered Nov 17 '16 at 06:57 AM

ismail.bulbul gravatar image

ismail.bulbul
53 1 2 3

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

For those still wondering about how the transform direction works in practice, here is an example of how to convert a global torque applied to a mesh into a local torque.

This example is rotating my teapot actor around the Z axis so you get a teapot spinning round on the flat floor. The torque being applied is in the Z axis only and its magnitude is stored in float variable Ztorque_Pos (Pos is short for positive not for position).

alt text

This second image is how you transform that torque so that it matches the orientation of the teapot. Then, the teapot will rotate correctly on an angled surface for instance.

alt text

Note that once transformed the torque vector will no longer have X and Y values equal to zero so you must feed all three x,y,z to the Add torque node.

The number 2 at the end of the names is not significant, I just made a second teapot with that name.

Time for a nice cup of tea I think.

more ▼

answered May 03 '17 at 05:03 PM

Podgyhodgy gravatar image

Podgyhodgy
46 2 4

steadiworkz gravatar image steadiworkz 6 days ago

I think this may have changed now, I've found the node "get Relative Transform" does the job !alt text

roll.png (368.9 kB)
(comments are locked)
10|2000 characters needed characters left

Thanks for coming back with your answer. These forums are a bit bare on answers at the moment and any answer no matter how little might help someone.

more ▼

answered Apr 07 '14 at 09:24 AM

davvyk gravatar image

davvyk
11 3 3 3

Podgyhodgy gravatar image Podgyhodgy May 03 '17 at 05:04 PM

Answer posted below

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

Another potential solution:

I realized I had "use controller pitch / yaw / roll" set to "true" in the details section of my physics-driven pawn. Unchecking those options finally let my pawn rotate freely using AddTorque.

(This was after trying converting the coordinate space on my torque vectors between world and local without any luck.)

alt text

more ▼

answered Nov 17 '16 at 05:21 AM

monotoan gravatar image

monotoan
71 1 4 5

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

I'm not sure if its a new node but you can now call "Get Relative Transform" and specify the relevant object you want to check for it.

alt text

roll.png (368.9 kB)
more ▼

answered Jun 19 '17 at 02:42 PM

steadiworkz gravatar image

steadiworkz
51 2 96 14

(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