Gamestudio Links
Zorro Links
Newest Posts
webGL
by Ice2642. 11/17/25 21:27
Camera always moves upwards?
by NeoDumont. 11/17/25 09:56
Future of ZorroHFT
by TipmyPip. 11/16/25 13:52
COT Download with Quandl does not work
by Petra. 11/15/25 09:35
Training with the R bridge does not work
by Petra. 11/15/25 09:31
Zorro 2.70
by jcl. 11/15/25 08:43
brokerCommand PLOT_HLINE parameters
by M_D. 11/13/25 10:42
ZorroGPT
by TipmyPip. 11/10/25 11:04
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
4 registered members (SkinnyApe, TipmyPip, VoroneTZ, JeyKey II), 7,568 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
SkinnyApe, tritom, sheliepaley, Blueguy, blobplayintennis
19179 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
entity following cursor's position #400606
05/04/12 15:00
05/04/12 15:00
Joined: Jul 2009
Posts: 96
M
mEnTaL Offline OP
Junior Member
mEnTaL  Offline OP
Junior Member
M

Joined: Jul 2009
Posts: 96
Ok, I know it sounds simple, but I just didn't manage to make it. I want an entity which follows the mouse cursor, but its Z position must be always 0. (I need this to place 3d entities in my level using just the mouse)
here's what I tried, but the engine crashes or nothing happens:

action object()
{
VECTOR* temp;
while(1)
{
temp.x = mouse_pos.x;
temp.y = mouse_pos.y;
temp.z = 0;
vec_for_screen(temp,camera);
vec_set(me.x,temp.x);
wait(1);
}
}

Re: entity following cursor's position [Re: mEnTaL] #400612
05/04/12 17:05
05/04/12 17:05
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline
User
Wjbender  Offline
User
W

Joined: Mar 2012
Posts: 927
cyberspace
Vector *tmp needs to be vector temp ,learned this from evilsob


Compulsive compiler
Re: entity following cursor's position [Re: Wjbender] #400621
05/04/12 18:45
05/04/12 18:45
Joined: Jul 2009
Posts: 96
M
mEnTaL Offline OP
Junior Member
mEnTaL  Offline OP
Junior Member
M

Joined: Jul 2009
Posts: 96
I changed it to VECTOR temp and it doeasn't show an error now;
I also changed temp.z = 200 and it works.
Problem fixed. Thanks.

Last edited by mEnTaL; 05/04/12 18:59.

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