# 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:** 1\
**Showing post:** 4

<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...

---

_[View the full topic](https://forums.unrealengine.com/t/total-newbie-post/29662)._
