Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/20/24 01:28
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 636 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
A7.70 mouse_dir3d doesn't work anymore #259040
04/03/09 14:59
04/03/09 14:59
Joined: Jan 2007
Posts: 651
Germany
R
RedPhoenix Offline OP
User
RedPhoenix  Offline OP
User
R

Joined: Jan 2007
Posts: 651
Germany
Hi conitec,

I'm very sure, that the vector mouse_dir3d doesn't return correct values for the mouse to level direction anymore. I'm using this vector in a lot of functions (placing entities with the mouse using c_trace, placing decals using c_trace, calculating target vectors for the point the mouse is pointing at etc. etc.) and all of these functions return completly wrong results since I updated from A7.60 to A7.70.

Re: A7.70 mouse_dir3d doesn't work anymore [Re: RedPhoenix] #259423
04/06/09 05:59
04/06/09 05:59
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
I can not confirm any such problem.

Re: A7.70 mouse_dir3d doesn't work anymore [Re: jcl] #259462
04/06/09 09:48
04/06/09 09:48
Joined: Jan 2007
Posts: 651
Germany
R
RedPhoenix Offline OP
User
RedPhoenix  Offline OP
User
R

Joined: Jan 2007
Posts: 651
Germany
I think I got the problem now.

Could it be possible that mouse_dir3d was previously normalised to a length of 1 or at least to a very low value and now it's not any more?

I previously used vec_scale to scale the direction to the length I wanted it to have - assuming that a direction vector is already normalized to the length of 1. When I now use vec_normalize instead, it works fine.

Re: A7.70 mouse_dir3d doesn't work anymore [Re: RedPhoenix] #259467
04/06/09 10:16
04/06/09 10:16
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
You're right, it's not normalized, but it wasn't normalized before either. The engine uses a vector of length 1 in screen coordinates and backprojects it to world coordinates. So it's final length depends on the screen size.

I'll normalize it from the next version on.


Moderated by  jcl, Nems, Spirit, Tobias 

Gamestudio download | chip programmers | 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