Gamestudio Links
Zorro Links
Newest Posts
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
4 registered members (degenerate_762, AbrahamR, AndrewAMD, ozgur), 667 guests, and 8 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
Camera #199695
04/01/08 01:22
04/01/08 01:22
Joined: Jun 2007
Posts: 43
Montréal
J
Julientdc Offline OP
Newbie
Julientdc  Offline OP
Newbie
J

Joined: Jun 2007
Posts: 43
Montréal
Hello,

We can make camera that can't pass across an other entity?

Or use the camera direcly with a collision function?

Thank you,
Julien

Re: Camera [Re: Julientdc] #199698
04/01/08 01:27
04/01/08 01:27
Joined: Feb 2008
Posts: 337
V
Vadim647 Offline
Senior Member
Vadim647  Offline
Senior Member
V

Joined: Feb 2008
Posts: 337
Something like that:
 Code:
vec_set(t_v2,vector(my.x,my.y,my.z+my.max_z));
			vec_set(t_v,vector(-384,0,0));vec_rotate(t_v,vector(camera.pan,my.tilt-30,my.roll));vec_add(t_v,t_v2);
			vec_set(camera.pan,vector(camera.pan,my.tilt-30,my.roll));
			c_trace(t_v2,t_v,IGNORE_ME|IGNORE_PASSABLE);
			if (trace_hit == 1)
			{
				vec_set(t_v,target);
				vec_sub(t_v,t_v2);
				vec_normalize(t_v,vec_length(t_v)-5);
				vec_add(t_v,t_v2);
			}
			vec_set(camera.x,t_v);

to use free camera with collision detection, attach it to moving small entity (maybe a ball)


I switched to other account since marth 2010. Guess which.

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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