Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 10/25/26 03:42
Chat Room for Zorro Programmers
by Haitao_Ren. 10/25/26 03:14
Trading Journey
by Haitao_Ren. 10/25/26 03:14
Algorithmic trading course with Zorro
by Haitao_Ren. 10/25/26 03:12
Zorro tutorial ideas?
by Haitao_Ren. 10/25/26 02:47
Zorro plugin for Hyperliquid.xyz
by mayarik. 10/24/26 09:14
Tradestation missing in table of contents
by AndrewAMD. 10/23/26 14:35
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (3run, TipmyPip, opm), 7,722 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Haitao_Ren, JimSimons, julienp, julienper, KelleyAbbey
19247 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: How to move 3d objects using mouse in real tim [Re: tex] #205545
05/07/08 07:57
05/07/08 07:57
Joined: Aug 2005
Posts: 1,558
HK
V
vlau Offline
Serious User
vlau  Offline
Serious User
V

Joined: Aug 2005
Posts: 1,558
HK
Try replace :

eBall.x= (camera.x+cos(cam_ang.pan)*(cam_dist*cos(cam_ang.tilt)));
eBall.y= -1*(camera.y+sin(cam_ang.pan)*(cam_dist*cos(cam_ang.tilt)));
eBall.z= (camera.z+sin(cam_ang.tilt)*cam_dist);

to

vec_set(eBall.x,cam_dist.x);
vec_rotate(eBall.x,camera.pan);
vec_add(eBall.x,camera.x);
vec_set(eBall.pan,camera.pan);

Not tested btw.


Last edited by vlau; 05/07/08 07:58.
Re: How to move 3d objects using mouse in real tim [Re: vlau] #205689
05/08/08 00:09
05/08/08 00:09
Joined: Apr 2008
Posts: 15
Oz
T
tex Offline OP
Newbie
tex  Offline OP
Newbie
T

Joined: Apr 2008
Posts: 15
Oz
Thanx Vlau

Unfortunately:

vec_set(eBall.x,cam_dist.x);
vec_rotate(eBall.x,camera.pan);
vec_add(eBall.x,camera.x);
vec_set(eBall.pan,camera.pan);

doesn't seem to work.

cam_dist is a var so only has one value not x, y, z. Although it would be possible to define separate values for each of these.

I think the problem is not with updating the position coordinates for eBall but its orientation. Not sure how to get this and pass it to eBall after executing the orbit function...

will try something else now...

Page 2 of 2 1 2

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