# Center cursor on an Oculus? Or, use linetrace like a cursor?

**URL:** <https://forums.unrealengine.com/t/center-cursor-on-an-oculus-or-use-linetrace-like-a-cursor/402193>\
**Category:** XR Development\
**Tags:** viewport, cursor, screen-resolution, unreal-engine, question, Blueprint\
**Created:** [August 18, 2017, 2:11pm UTC](https://forums.unrealengine.com/t/center-cursor-on-an-oculus-or-use-linetrace-like-a-cursor/402193 "2017-08-18T14:11:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_266d07fa](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_266d07fa](https://forums.unrealengine.com/u/anonymous_user_266d07fa)\
**Post date:** [August 18, 2017, 2:11pm UTC](https://forums.unrealengine.com/t/center-cursor-on-an-oculus-or-use-linetrace-like-a-cursor/402193/1 "2017-08-18T14:11:31Z")

</div>

I am trying to lock the cursor to the center of my screen in the VR preview. This is the setup I have in blueprints.

 ![210280-centerer.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/8/d/a8db97733227c55ca2428f538714285412f340c6.png)

However, when I run the program, the cursor is always locked to the bottom right of the viewport (in the red circle)

 ![210281-untitlsded.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/b/5/6b5b3655172f02ffa7426d75445341ca4a232454.jpeg)

What am I doing wrong? I can’t seem to get the cursor near the middle of the screen.

The thin blue line on the second screenshot is a linetrace, which is always centered, but I’m not sure how to use that with Cursor events.
