# Total newbie post

**URL:** <https://forums.unrealengine.com/t/total-newbie-post/29662>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [May 9, 2015, 4:12pm UTC](https://forums.unrealengine.com/t/total-newbie-post/29662 "2015-05-09T16:12:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_519e93f5](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_519e93f5](https://forums.unrealengine.com/u/anonymous_user_519e93f5)\
**Post date:** [May 9, 2015, 4:12pm UTC](https://forums.unrealengine.com/t/total-newbie-post/29662/1 "2015-05-09T16:12:23Z")

</div>

I’m coming from a Unity perspective. Paper2D seems to be really more developer friendly then Unity’s Sprite Engine. I do have a c++ background although it’s been 7 years.

I have completed the FloatingActor tutorial and I would like to know how can I detect a Mouse Click and a Touch on that object. Although FloatingActor is using 3d it should be a good enough starting point. c++ or blueprint to c++ would be great! If nothing else, just point me in the right direction.

(I originally posted this to the answer hub, I believe that was the wrong place or was it correct? 🙂 )  
Many Thanks! Bubba

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6d3a5d00](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6d3a5d00](https://forums.unrealengine.com/u/anonymous_user_6d3a5d00)\
**Post date:** [May 10, 2015, 1:18am UTC](https://forums.unrealengine.com/t/total-newbie-post/29662/2 "2015-05-10T01:18:51Z")

</div>

Here is what you may be looking for. This is how to get events regarding the mouse. It will show you in BP, but that should get you on the right track.

> **[How to detect object on mouse click](https://forums.unrealengine.com/questions/82735/how-to-detect-object-on-mouse-click.html)**
>
> Hey Guys! I’m pretty new to UE. I’m just playing around with top down template. I created my own player controller and set the right mouse click to move the player. Its working fine. I tried creating a left mouse click event to select the player and...

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_519e93f5](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_519e93f5](https://forums.unrealengine.com/u/anonymous_user_519e93f5)\
**Post date:** [May 11, 2015, 4:19am UTC](https://forums.unrealengine.com/t/total-newbie-post/29662/3 "2015-05-11T04:19:03Z")

</div>

Thanks but I’m really not looking for a straight blueprint solution,

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6d3a5d00](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6d3a5d00](https://forums.unrealengine.com/u/anonymous_user_6d3a5d00)\
**Post date:** [May 11, 2015, 4:15pm UTC](https://forums.unrealengine.com/t/total-newbie-post/29662/4 "2015-05-11T16:15:25Z")

</div>

Was trying to point you in the right direction but heres a step by step:

First, make sure you have touch and mouse over events enabled  
CollisionComponent()-\>bEnableMouseOverEvents = true;

then create an on clicked delegate in your actor:

CollisionComponent-\>OnClicked.AddDynamic(this, &YourClass::OnClickEvent);

and make your delegate do what it needs.

Or, just have a generalized MouseClick event in your controller that does the following:

OnMouseClick perform a raycast and see if it collides with an object.  
If it does, deselect anything selected.  
Then check to make sure its the type you need it to be.

This documentation here has a good basics on ray-casting to find items in a scene based on what the mouse is looking at. Doesnt include on click, but just add a click event that calls something similar to this and it should work.

> **[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 — https://unrealcommunity.wiki/! You will be able to find content from...

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_519e93f5](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_519e93f5](https://forums.unrealengine.com/u/anonymous_user_519e93f5)\
**Post date:** [May 13, 2015, 1:10pm UTC](https://forums.unrealengine.com/t/total-newbie-post/29662/5 "2015-05-13T13:10:32Z")

</div>

Thanks, Like I said, total newbie to Unreal and only understand enough blueprint to follow the tutorials. I’m sure your answers will help somebody with a little more experience.
