psmoveapi icon indicating copy to clipboard operation
psmoveapi copied to clipboard

Request for psmove_tracker_get_aimed_position

Open Splizard opened this issue 11 years ago • 5 comments

It would be great to be able to get the x, y coordinates on screen of where the PSmove is being aimed at, for example when the move is being used as a gun. If this needs to be callibrated perhaps an easy way to set the callibration could be added too, such as aiming at the 4 corners of the screen, running a function for each etc. This would hugely simplify creating apps where you are interacting to the screen with the tracker.

Splizard avatar Nov 26 '14 02:11 Splizard

Good idea. A simple 4-point-calibration should be easy to do. There's even some code that maps the camera position of a controller to screen coordinates with 4-point calibration (see examples/labs/whiteboard/mapping.h).

Do you have some example application in mind? Might be useful to have an example application as "framework" for implementing and prototyping such support.

thp avatar May 25 '15 08:05 thp

Yea it would be nice to have the rotation of the controller taken into account, I haven’t used psmoveapi lately but from what I remember you can only get the screen coordinates but rotating the controller would not make a difference. Essentially pointing the move should draw a line towards the screen and where this "hypothetical" line intersects with the screen, this should be the X, Y coordinates. Since the camera is not at the same position as the screen this needs to be calibrated accordingly. It would be useful for a simple shooting game, so the user can aim down the move, and also in other move applications where it gives a larger degree of movement. (as long as the Move is in view of the camera, you can aim at any point on the screen just by rotating/aiming the controller)

Splizard avatar May 26 '15 03:05 Splizard

i want to use psmove controller as gun. it does not have to work as a simple pointer but the pseye should detect the position of psmove on the monitor and understand where I am pointing the psmove. are there any projects already done?

isidoro-80 avatar Nov 26 '20 15:11 isidoro-80

@isidoro-80 Depending on what you want to do, maybe https://github.com/MooseTheBrown/psmoveinput fits the bill?

thp avatar Dec 05 '20 09:12 thp

Thanks but what you suggest is not good. I don't want to use psmove as a mouse. I want to use psmove as a lightgun. There is a big difference. The mouse has an absolute position while the relative lightgun. If I use the psmove as a mouse it doesn't matter where it is pointing just move psmove to make the pubactor move. The lightgun instead serves a relative position. When I point to the monitor, the mouse pointer must be at that precise point. To do this you also need pseye which tells the pc where the psmove is at that moment with respect to the screen.

Il sab 5 dic 2020, 10:02 Thomas Perl [email protected] ha scritto:

@isidoro-80 https://github.com/isidoro-80 Depending on what you want to do, maybe https://github.com/MooseTheBrown/psmoveinput fits the bill?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/thp/psmoveapi/issues/145#issuecomment-739149656, or unsubscribe https://github.com/notifications/unsubscribe-auth/AR43TTC4BYZPQZ5PQGUMQUTSTHZKTANCNFSM4AYC6IFA .

isidoro-80 avatar Dec 06 '20 14:12 isidoro-80