# How can I rotate a object, when grabbed? (Physics Handle)

**URL:** <https://forums.unrealengine.com/t/how-can-i-rotate-a-object-when-grabbed-physics-handle/343672>\
**Category:** World Creation\
**Tags:** physics-handle, rotation, unreal-engine, question\
**Created:** [January 10, 2016, 7:31pm UTC](https://forums.unrealengine.com/t/how-can-i-rotate-a-object-when-grabbed-physics-handle/343672 "2016-01-10T19:31:11Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_707e4329](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_707e4329](https://forums.unrealengine.com/u/anonymous_user_707e4329)\
**Post date:** [January 10, 2016, 7:31pm UTC](https://forums.unrealengine.com/t/how-can-i-rotate-a-object-when-grabbed-physics-handle/343672/1 "2016-01-10T19:31:11Z")

</div>

Hello, basically I’m creating a object grabbing system for my game, I had no idea how to do something like this so I’ve exactly replicate this blueprint on this video tutorial;

https://www.youtube.com/embed/OltZ-xFz8IQ?feature=oembed&wmode=opaque&list=WL

Surprisingly everything worked and is working to this moment, but one thing that I need to be able to do is to rotate the grabbed object by pressing/holding a button, sadly he doesn’t show you how to do that. Here is my question; how would I do something like that? what nodes would I have to add? Thanks. 🙂

---

<div class="post-metadata">

**Author:** ![FilipeTessaro](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/filipetessaro/32/1194666_2.png) [@FilipeTessaro](https://forums.unrealengine.com/u/FilipeTessaro)\
**Post date:** [January 11, 2016, 12:29pm UTC](https://forums.unrealengine.com/t/how-can-i-rotate-a-object-when-grabbed-physics-handle/343672/2 "2016-01-11T12:29:31Z")

</div>

Hi Sebapler

Ok man, I recreate the Tesla Tutorial (Tesla´s Tuts are always amazing) to be easier for you to understand what I did.

It is simple, actually

After the video tutorial, just create the following Blueprint:

 ![73853-bp+to+rot+after+drag+it.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/e/3/6e3ec4134059177f003b15ed6f3b631a2a03bd9c.png)

Put it after the Tick Event with the branch, it will take your mouse postion, create a rotation - 5000 (I needed to put this high amount to have a better looking when rotating the object, if you want the object to rotate slowly, just increase this number a lot, like 6000, 7000 and so on.

Here is the result: [- YouTube](https://www.youtube.com/watch?v=JMCq-7C6TbY)

Hope you can succeed!  
Good Luck!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_707e4329](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_707e4329](https://forums.unrealengine.com/u/anonymous_user_707e4329)\
**Post date:** [January 11, 2016, 8:00pm UTC](https://forums.unrealengine.com/t/how-can-i-rotate-a-object-when-grabbed-physics-handle/343672/3 "2016-01-11T20:00:40Z")

</div>

Hello, thank you for your help 🙂 Why doesn’t everything just work! 🙂 I’ve replicated your script (as shown) but it looks like something isn’t working, it’s probably me (messed something up again) for some reason when I press (alt) it doesn’t look the same as on your video, and I don’t know what this is causing , maybe you know the fix for this, and sometimes (most of the time) when I grab a object it just starts rotating without me pressing anything, sometimes slow, sometimes faster and sometimes when I press (alt) they also start rotating (very fast) I would really appreciate if you would help to fix this 🙂

Oh yeah and I’ve also created a short video this time 🙂

[![]( " - YouTube") ](https://www.youtube.com/watch?v=ZMBORXUuFow)

---

<div class="post-metadata">

**Author:** ![FilipeTessaro](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/filipetessaro/32/1194666_2.png) [@FilipeTessaro](https://forums.unrealengine.com/u/FilipeTessaro)\
**Post date:** [January 11, 2016, 8:30pm UTC](https://forums.unrealengine.com/t/how-can-i-rotate-a-object-when-grabbed-physics-handle/343672/4 "2016-01-11T20:30:59Z")

</div>

Oh man! Sorry, I forgot to show you this BP:

 ![73943-forgot+it+sorry.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/f/7/df71f414eeaf777c1a32fc7d7565f06216fd04c3.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_707e4329](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_707e4329](https://forums.unrealengine.com/u/anonymous_user_707e4329)\
**Post date:** [January 11, 2016, 8:59pm UTC](https://forums.unrealengine.com/t/how-can-i-rotate-a-object-when-grabbed-physics-handle/343672/5 "2016-01-11T20:59:37Z")

</div>

Idk, still the same

---

<div class="post-metadata">

**Author:** ![FilipeTessaro](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/filipetessaro/32/1194666_2.png) [@FilipeTessaro](https://forums.unrealengine.com/u/FilipeTessaro)\
**Post date:** [January 11, 2016, 9:11pm UTC](https://forums.unrealengine.com/t/how-can-i-rotate-a-object-when-grabbed-physics-handle/343672/6 "2016-01-11T21:11:19Z")

</div>

if you replicated the second bluprint in your “Mouse Input” set up, there is no reason to be different than mine…  
check it again pls and if possible, show me another video, thanks

---

<div class="post-metadata">

**Author:** ![FilipeTessaro](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/filipetessaro/32/1194666_2.png) [@FilipeTessaro](https://forums.unrealengine.com/u/FilipeTessaro)\
**Post date:** [January 20, 2016, 9:24pm UTC](https://forums.unrealengine.com/t/how-can-i-rotate-a-object-when-grabbed-physics-handle/343672/7 "2016-01-20T21:24:12Z")

</div>

Still there my friend? Not hearing from you anymore!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_707e4329](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_707e4329](https://forums.unrealengine.com/u/anonymous_user_707e4329)\
**Post date:** [January 23, 2016, 7:05pm UTC](https://forums.unrealengine.com/t/how-can-i-rotate-a-object-when-grabbed-physics-handle/343672/8 "2016-01-23T19:05:15Z")

</div>

Oww, Hello!, I’ve left this for now (I’ve realized that is isn’t what I need) Now I need some help with creating a basic stamina system for example when running it takes away some % of the stamina, and when not running anymore it regenerates. Any ideas how to do so?

---

<div class="post-metadata">

**Author:** ![FilipeTessaro](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/filipetessaro/32/1194666_2.png) [@FilipeTessaro](https://forums.unrealengine.com/u/FilipeTessaro)\
**Post date:** [January 23, 2016, 8:41pm UTC](https://forums.unrealengine.com/t/how-can-i-rotate-a-object-when-grabbed-physics-handle/343672/9 "2016-01-23T20:41:37Z")

</div>

Hello!

It is not so hard to do, but, it is more simple for you if you follow this tutorial from Unreal Staff:

It will teach you more than that:

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_707e4329](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_707e4329](https://forums.unrealengine.com/u/anonymous_user_707e4329)\
**Post date:** [January 23, 2016, 8:58pm UTC](https://forums.unrealengine.com/t/how-can-i-rotate-a-object-when-grabbed-physics-handle/343672/10 "2016-01-23T20:58:24Z")

</div>

Oh yeah, I’ve seen this tutorial already, (I’ve learned a lot from it) to be honest that is the exactly same tutorial that I used to create my stamina bar. I also have a inventory (fully working) but I didn’t use this one, it’s a bit too basic, I’ve used a different tutorial for that (surprisingly, everything seems to work fine) I used this:

https://www.youtube.com/embed/6xIPbU9WWeo?feature=oembed&wmode=opaque&list=PL11wSpkPzF3RLLk-dgvC8gTKUjHkE9FtF

I need a more advanced stamina system for example, when you run it takes away some percent of your stamina (from a bar, like in the tutorial) and when you stop running, it regenerates back to 100%

It’s nice to be talking with you again 🙂

---

<div class="post-metadata">

**Author:** ![FilipeTessaro](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/filipetessaro/32/1194666_2.png) [@FilipeTessaro](https://forums.unrealengine.com/u/FilipeTessaro)\
**Post date:** [January 23, 2016, 9:05pm UTC](https://forums.unrealengine.com/t/how-can-i-rotate-a-object-when-grabbed-physics-handle/343672/11 "2016-01-23T21:05:17Z")

</div>

run you mean sprint?

Using the same turorial ,you can drag from your stamina logic and get the Stamina variable minus a float or integer value than set it to be new value

To recover, you can create a logic from your Event tick. let´s supose that your stamina default value is 10.

from the event tick, if the stamina value is less than 10, you get the stamina value add a float/integer value to it set the new value into the variable. Note that you have to create a timer to avoid the event tick update every frame, you can create a timer by 1 or 2 seconds, for example

With that logic, the stamina will increase only if it is less than 10.  
You can also set the Stamina to 10, if it becomes more that 10

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_707e4329](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_707e4329](https://forums.unrealengine.com/u/anonymous_user_707e4329)\
**Post date:** [January 23, 2016, 9:10pm UTC](https://forums.unrealengine.com/t/how-can-i-rotate-a-object-when-grabbed-physics-handle/343672/12 "2016-01-23T21:10:35Z")

</div>

Sorry, I’m still a noob in this types of things :D, can you create something like this in a blueprint and send me a pic? 😃

I would really appreciate it.

---

<div class="post-metadata">

**Author:** ![FilipeTessaro](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/filipetessaro/32/1194666_2.png) [@FilipeTessaro](https://forums.unrealengine.com/u/FilipeTessaro)\
**Post date:** [January 23, 2016, 9:32pm UTC](https://forums.unrealengine.com/t/how-can-i-rotate-a-object-when-grabbed-physics-handle/343672/13 "2016-01-23T21:32:43Z")

</div>

haha, check this out and try at your end:

 ![75676-pic1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/2/e/62e973c5088598eb67d5d0e4fc4dba9e4c245a66.png)

 ![75677-pic2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/9/f/49fad9d48e580c2da5f89704e2f660cd7156abb6.png)

---

<div class="post-metadata">

**Author:** ![duythvn](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@duythvn](https://forums.unrealengine.com/u/duythvn)\
**Post date:** [February 18, 2016, 9:01pm UTC](https://forums.unrealengine.com/t/how-can-i-rotate-a-object-when-grabbed-physics-handle/343672/14 "2016-02-18T21:01:49Z")

</div>

hey FilipeTessaro  
I was looking into creating 2 different interactions

- pickup / release when P key is pressed
- rotate object when R key is hold  
And i ran into your solution ( looks like this solution is to tackle another scenario but I was hoping to replicate your blueprints at least )  
However, I’m not 100% sure if I got the blueprints correctly. Can you help me out ( Tesla’s pickup/release part is already done and it works fine)

Thanks !!

 ![79024-blueprint.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/d/8/8d827aef4d074e70e5b1368e321470205453650f.png)

---

<div class="post-metadata">

**Author:** ![FilipeTessaro](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/filipetessaro/32/1194666_2.png) [@FilipeTessaro](https://forums.unrealengine.com/u/FilipeTessaro)\
**Post date:** [February 18, 2016, 9:37pm UTC](https://forums.unrealengine.com/t/how-can-i-rotate-a-object-when-grabbed-physics-handle/343672/15 "2016-02-18T21:37:45Z")

</div>

hello

ok, but your BP seems ok, is it not working at all?

I can upload my project with the blueprint so you guys can study from it. What do you think?

---

<div class="post-metadata">

**Author:** ![duythvn](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@duythvn](https://forums.unrealengine.com/u/duythvn)\
**Post date:** [February 19, 2016, 11:01pm UTC](https://forums.unrealengine.com/t/how-can-i-rotate-a-object-when-grabbed-physics-handle/343672/16 "2016-02-19T23:01:27Z")

</div>

that would be great !!! little things like this somehow help us (at least me) know more about blueprints so yeah please do 🙂

ps: also, what do you think about having 2 different buttons to handle Rotate Or Move… the events still need to be linked to the same Event Tick do they?

---

<div class="post-metadata">

**Author:** ![FilipeTessaro](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/filipetessaro/32/1194666_2.png) [@FilipeTessaro](https://forums.unrealengine.com/u/FilipeTessaro)\
**Post date:** [February 19, 2016, 11:08pm UTC](https://forums.unrealengine.com/t/how-can-i-rotate-a-object-when-grabbed-physics-handle/343672/17 "2016-02-19T23:08:52Z")

</div>

I will upload it for you.

PSS: Yes, it has, because the position and rotation need to be updated everytime, if not, it will have a stuttering effect.

I will upload and post the link here very soon

---

<div class="post-metadata">

**Author:** ![FilipeTessaro](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/filipetessaro/32/1194666_2.png) [@FilipeTessaro](https://forums.unrealengine.com/u/FilipeTessaro)\
**Post date:** [February 19, 2016, 11:42pm UTC](https://forums.unrealengine.com/t/how-can-i-rotate-a-object-when-grabbed-physics-handle/343672/18 "2016-02-19T23:42:45Z")

</div>

Hello

Here is the link for download: [https://drive.google.com/open?id=0By56GzMMq0nYNW4wbDRtcTV5enc](https://drive.google.com/open?id=0By56GzMMq0nYNW4wbDRtcTV5enc)

I also made some comments in the blueprint to make it easier to understand.

---

<div class="post-metadata">

**Author:** ![duythvn](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@duythvn](https://forums.unrealengine.com/u/duythvn)\
**Post date:** [February 21, 2016, 2:30am UTC](https://forums.unrealengine.com/t/how-can-i-rotate-a-object-when-grabbed-physics-handle/343672/19 "2016-02-21T02:30:44Z")

</div>

wow 97mb  
thanks for taking the time to upload man, really appreciate!
