# Spawn Actor on mouse location with editor widget

**URL:** <https://forums.unrealengine.com/t/spawn-actor-on-mouse-location-with-editor-widget/487969>\
**Category:** UI\
**Tags:** editor-utility-widge, spawn-actor-from-cla, unreal-engine, Widget, question\
**Created:** [August 25, 2021, 6:48am UTC](https://forums.unrealengine.com/t/spawn-actor-on-mouse-location-with-editor-widget/487969 "2021-08-25T06:48:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shaon2007](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shaon2007](https://forums.unrealengine.com/u/Shaon2007)\
**Post date:** [August 25, 2021, 6:48am UTC](https://forums.unrealengine.com/t/spawn-actor-on-mouse-location-with-editor-widget/487969/1 "2021-08-25T06:48:04Z")

</div>

Greetings to everyone,

I am making a game with maps that use a grid system. I am using an actor and spawn objects in the world. Each object acts as a grid. This will be significant as I can change the map easily if I need.

Because I need to have many objects instead of spawning them manually, I want to make an editor widget that can spawn the objects.

So what I am trying to do is get the mouse location and spawn an object at the mouse location. But the problem is how do I get the mouse location. In normal blueprints “convert mouse location to world space” can be used but not in the editor widget. Is there a way to get the mouse location or any other way to spawn the objects?

Thank you

---

<div class="post-metadata">

**Author:** ![Fran.Fndz](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/fran.fndz/32/608277_2.png) [@Fran.Fndz](https://forums.unrealengine.com/u/Fran.Fndz)\
**Post date:** [February 21, 2022, 11:05am UTC](https://forums.unrealengine.com/t/spawn-actor-on-mouse-location-with-editor-widget/487969/2 "2022-02-21T11:05:42Z")

</div>

Trying to do the same.

Right now I can spawn from the middle of the screen (viewport camera position + forward vector) but I cant do it with the mouse position.
