Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
1 registered members (Grant), 999 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Camera position on slope #262526
04/24/09 11:14
04/24/09 11:14
Joined: Mar 2009
Posts: 276
Cebu City, Philippines
boyax Offline OP
Member
boyax  Offline OP
Member

Joined: Mar 2009
Posts: 276
Cebu City, Philippines
Hi,

I need some help and/or sample code....Pls.
I want my camera tilt when my player is going through a slope in the mountain.. The camera is position above the player.

I know it's a simple camera tilting.. but I got stucked how would i know the player is already on the slope of the mountain???

Pls. advise. Thanks.

Re: Camera position on slope [Re: boyax] #262708
04/25/09 10:23
04/25/09 10:23
Joined: Apr 2009
Posts: 298
Southern Oceans
KiwiBoy Offline
Member
KiwiBoy  Offline
Member

Joined: Apr 2009
Posts: 298
Southern Oceans
I had this in the while loop of my actor after the gravity, might help.
set camera tilt to actor tilt.
Code:
			temp.tilt = 0;
			temp.roll = 0;
			temp.pan = -my.pan;
			vec_rotate(normal, temp);
			temp.tilt = -asin(normal.x);
			temp.roll = -asin(normal.y);
			my.tilt += 0.1 * ang(temp.tilt - my.tilt); // play with 0.1
			my.roll += 0.1 * ang(temp.roll - my.roll); // play with 0.1


Re: Camera position on slope [Re: KiwiBoy] #262720
04/25/09 13:57
04/25/09 13:57
Joined: Oct 2007
Posts: 5,209
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,209
İstanbul, Turkey
what do you ecaxtly want, you want your camera's tilt to be same as the surface character sliding on?


3333333333
Re: Camera position on slope [Re: Quad] #262974
04/27/09 09:53
04/27/09 09:53
Joined: Mar 2009
Posts: 276
Cebu City, Philippines
boyax Offline OP
Member
boyax  Offline OP
Member

Joined: Mar 2009
Posts: 276
Cebu City, Philippines
Yes, how should i do that?

I think I just trace the z changes of the player...


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