Views: 2,738,495 Homepage | Main | Rules/FAQ | Memberlist | Active users | Last posts | Calendar | Stats | Online users | Search 09-17-21 12:53 AM
Guest:

0 users reading 3d look by mouse like fps(first person shooter) on pc. | 1 bot

Main - Development - 3d look by mouse like fps(first person shooter) on pc. New reply


temp12312
Posted on 07-24-21 03:17 PM Link | #4095
I tried, but failed:

Get mouse/cursor coords through event.
Then if cursor out of "touch panel" setpos it to center of the panel.
Then nds touch screen with coords.
Then if some amount of time passed setpos cursor to center(I tried to setpos right after handling coords but if event called immediately after previous event then look in game will not be handled properly).

The best I did:

void ScreenHandler::screenOnMouseRelease(QMouseEvent* event)
{
event->accept();
if (event->button() != Qt::LeftButton) return;

if (touching)
{
touching = false;
NDS::ReleaseScreen();
QCursor::setPos( QPoint(Config::WindowWidth * 3 / 4, Config::WindowHeight / 2) ); //that + works only in horizontal layout
}
}

TL;DR

It would be cool if someone will code this feature request.


Main - Development - 3d look by mouse like fps(first person shooter) on pc. New reply

Page rendered in 0.019 seconds. (2048KB of memory used)
MySQL - queries: 28, rows: 70/70, time: 0.017 seconds.
[powered by Acmlm] Acmlmboard 2.064 (2018-07-20)
© 2005-2008 Acmlm, Xkeeper, blackhole89 et al.