Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (AndrewAMD, Ayumi, NewbieZorro), 14,141 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: 3D mouse cursor #6143
06/26/02 20:54
06/26/02 20:54

A
Anonymous
Unregistered
Anonymous
Unregistered
A



Some additions,

In this forum I often come across the problem that people want to move their player to where they click in the 3d-world. The solution to this is - as mentioned very often - the mouse_to_level funtion in the templates.
I do not think that I can fix my problem that way, but perhaps someone knows better than me?!

Another thing I want to do is give my 3d-pointer some lines (along the 3 axis) to better know where it is in the 3d-world.
Has someone an idea of how to best do that? Is D3D the way to go? (btw I do everything (event handling, movement, ...) in dll's)
I recently stumbled across a built in function of 3DGS: when pressing the d key a panel with some information shows up. Pressing d again some red lines along the room borders show up. Where is this implemented? These lines from my pointer to the walls would exactly what I want to do.

Ok so long and if anybody has accomplished such an 3D pointer - please let me know.

Re: 3D mouse cursor #6144
06/27/02 06:11
06/27/02 06:11

A
Anonymous
Unregistered
Anonymous
Unregistered
A



create the 3d object as a global entity, then get it to "follow" a hidden mouse cursor.

Re: 3D mouse cursor #6145
06/27/02 09:45
06/27/02 09:45

A
Anonymous
Unregistered
Anonymous
Unregistered
A



Maybe I can spread some light on this.

When I first tried to shoot people with the mouse (and presently) I ran a trace with two z values for the mouse position. One near the player and one far away. Once the trace has been run I convert the mouse position to world coordinates using the trace result (plus the closer z value) as the z coordinate. I gather the the template version uses camera.z which I thought should be the height coordinate of the camera... oye, anyway my version works perfectly.

On the terms "vector, coordinate, direction, and distance" I see them too often used interchangeably, even in technical writing.
AFAIK the actual definitions are as follows:

A vector is a relationship between two points in space, in terms of spacial coordinates (xyz).

A coordinate is the location of a point in space (xyz).

direction is the relationship of one point in space to another point, ignoring distance (pan,tilt,roll)

distance is the shortest path between two points in space, ignoring direction (called x in 3dgs, some other programs call it z).

Euler angles are easy to understand if you use your head. Pan is right/left rotation, tilt is up/down rotation, roll is cocking your head one way or the other.

Re: 3D mouse cursor #6146
06/27/02 18:42
06/27/02 18:42

A
Anonymous
Unregistered
Anonymous
Unregistered
A



HI again,

I wonder if the thing I try is possible at all. The problem does not consist of moving an entity around (coupled to the mouse). My problem is not being able to move the entity just up to every border (reaching the border of the window (view) and not going beyond it).
I think - Dude - that you put up a crosshair or something to shoot at entities. So you use a normal mouse-pointer on your 2D screen and get a vector from the camera position in the direction you point with your mouse. Tracing along this vector you get the entity that is first hit. So you got the coordinates of that entity (or whatever obstacle).

For my 3D-pointer I think I need something like getting the dimensions of the "room" I can see in my view and align the maximum values to the maximum values of the 2D-screen-mouse-position (i.e. pointer.x, pointer.y).
Moreover I see problems in tilting or rolling the camera.
If someone has an idea how to do this ... I would be thankful if you share!

Re: 3D mouse cursor #6147
06/27/02 18:45
06/27/02 18:45

A
Anonymous
Unregistered
Anonymous
Unregistered
A



quote:
Originally posted by cheets:
create the 3d object as a global entity, then get it to "follow" a hidden mouse cursor.

I do not know what you mean with that exactly. I have created an entity from my dll and it follows my mouse-movements. But not in the way I want it to.

Re: 3D mouse cursor #6148
06/27/02 23:51
06/27/02 23:51

A
Anonymous
Unregistered
Anonymous
Unregistered
A



And again some news...
Now working with the mouse_force values ... and what should I say - It's working fine.

The point that is unsolved by now is about how to display some lines from my pointer-entity along the axis to better being able to estimate the position of the pointer in the 3D-scene.

Again I point out to the built-in (?) function when pressing d while running a level from WED. There are red lines showing along the room borders. How did they make it there? Would be interesting to know.

Greetings

Page 2 of 2 1 2

Moderated by  HeelX, Spirit 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1