Gamestudio Links
Zorro Links
Newest Posts
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 (M_D), 1,501 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
camera effect #448362
02/01/15 17:21
02/01/15 17:21
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline OP
User
Wjbender  Offline OP
User
W

Joined: Mar 2012
Posts: 927
cyberspace
hi , I need some help with creating a camera effect .

The effect must be like a breathing movement but
I want to do this in code , any comments or help please ?

jb.

edit.
what I have is this at the moment ..

Code:
var mov=0
int dir=0

void camera_effect ()
{
 if (mov <=-0.3)dir=0
 if (mov>=0.3)dir=1
 if (dir==0)mov+=0.1
 if (dir==1)mov-=0.1
camera.tilt+=mov*time_step
smooth (mov,0.95)
}



is there a better way ?

Last edited by Wjbender; 02/01/15 17:40.

Compulsive compiler
Re: camera effect [Re: Wjbender] #448363
02/01/15 17:40
02/01/15 17:40
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline
Serious User
Ch40zzC0d3r  Offline
Serious User
C

Joined: Oct 2011
Posts: 1,082
Germany
sin/cos might help you here

Re: camera effect [Re: Ch40zzC0d3r] #448367
02/01/15 20:01
02/01/15 20:01
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline OP
User
Wjbender  Offline OP
User
W

Joined: Mar 2012
Posts: 927
cyberspace
thanks using sin on the values made it much better


Compulsive compiler

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