View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005310 | DarkRadiant | General | public | 28.07.2020 11:47 | 05.02.2021 11:29 |
Reporter | stgatilov | Assigned To | greebo | ||
Priority | normal | Severity | feature | Reproducibility | N/A |
Status | closed | Resolution | fixed | ||
Product Version | 2.8.0 | ||||
Target Version | 2.9.0 | Fixed in Version | 2.9.0 | ||
Summary | 0005310: Add a way to teleport to coordinates (via Console Command or Python) | ||||
Description | The TDM game has commands: getviewpos setviewpos x y z a b c The first one prints coordinates and Euler angles, the second one teleports player to coordinates and orients by angles. Note that angles are options, since in most cases user don't need them. It would be great to have similar feature in DR, be it a separate dialog or just a scripting command. | ||||
Tags | No tags attached. | ||||
CTRL+MIDDLEMOUSE button can move the camera to a point in one of the ortho views MIDDLEMOUSE button + move cursor changes the camera to look at the mouse in the ortho views In DR they are called Drag Camera and Drag View You should be able to get what you want using those two. |
|
With ortho view, I can only set two coordinates. How to set third coordinate? And for it to happen, I have to monitor coordinates while moving mouse, which takes some time and effort. |
|
In the recent master branch, getting or setting the camera position via C++ code can be done like this: // This might throw an std::runtime_error if no camera is present auto& camera = GlobalCameraManager().getActiveView(); // Get the current position and angles Vector3 orig = camera.getCameraOrigin(); Vector3 angles = camera.getCameraAngles(); // Set the current position and angles camera.setCameraOrigin(orig); camera.setCameraAngles(angles); // Or set both at the same time camera.setOriginAndAngles(orig, angles); I'll have a look at exposing that functionality to the CommandSystem and Python scripts. |
|
New console commands available: SetActiveCameraPosition "100 40 50" SetActiveCameraAngles "30 10 20" Camera angles are pitch,yaw,roll in degrees. |
|
DarkRadiant: master d8b7878d 02.10.2020 18:58 Details Diff |
0005310: Add CameraInterface to python scripting module |
Affected Issues 0005310 |
|
mod - plugins/script/Makefile.am | Diff File | ||
mod - plugins/script/ScriptingSystem.cpp | Diff File | ||
add - plugins/script/interfaces/CameraInterface.cpp | Diff File | ||
add - plugins/script/interfaces/CameraInterface.h | Diff File | ||
mod - tools/msvc/script.vcxproj | Diff File | ||
mod - tools/msvc/script.vcxproj.filters | Diff File | ||
DarkRadiant: master bec4d2ad 02.10.2020 19:08 Details Diff |
0005310: Fix test.py script |
Affected Issues 0005310 |
|
mod - install/scripts/test.py | Diff File | ||
DarkRadiant: master 41e3b4c8 03.10.2020 02:55 Details Diff |
0005310: Add commands to set the camera's position and angles. |
Affected Issues 0005310 |
|
mod - radiantcore/camera/CameraManager.cpp | Diff File | ||
mod - radiantcore/camera/CameraManager.h | Diff File | ||
DarkRadiant: master debae722 03.10.2020 03:15 Details Diff |
0005310: Add unit tests covering the commands SetActiveCameraPosition and SetActiveCameraAngles. |
Affected Issues 0005310 |
|
mod - test/CSG.cpp | Diff File | ||
add - test/Camera.cpp | Diff File | ||
mod - test/RadiantTest.h | Diff File | ||
mod - tools/msvc/Tests/Tests.vcxproj | Diff File | ||
mod - tools/msvc/Tests/Tests.vcxproj.filters | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
28.07.2020 11:47 | stgatilov | New Issue | |
24.08.2020 17:55 | AluminumHaste | Note Added: 0012758 | |
25.08.2020 04:37 | stgatilov | Note Added: 0012759 | |
02.10.2020 16:31 | greebo | Note Added: 0012789 | |
02.10.2020 16:31 | greebo | Status | new => confirmed |
02.10.2020 16:32 | greebo | Summary | Add a way to teleport to coordinates => Add a way to teleport to coordinates (via Console Command or Python) |
02.10.2020 16:32 | greebo | Target Version | => 2.9.0 |
02.10.2020 19:08 | greebo | Changeset attached | => DarkRadiant master d8b7878d |
02.10.2020 19:08 | greebo | Changeset attached | => DarkRadiant master bec4d2ad |
03.10.2020 03:15 | greebo | Changeset attached | => DarkRadiant master 41e3b4c8 |
03.10.2020 03:15 | greebo | Changeset attached | => DarkRadiant master debae722 |
03.10.2020 03:15 | greebo | Assigned To | => greebo |
03.10.2020 03:16 | greebo | Status | confirmed => assigned |
03.10.2020 03:16 | greebo | Status | assigned => resolved |
03.10.2020 03:16 | greebo | Resolution | open => fixed |
03.10.2020 03:16 | greebo | Fixed in Version | => 2.9.0 |
03.10.2020 03:17 | greebo | Note Added: 0012790 | |
05.02.2021 11:29 | greebo | Status | resolved => closed |