Gamestudio Links
Zorro Links
Newest Posts
What are you working on?
by rayp. 10/15/25 20:44
Help!
by VoroneTZ. 10/14/25 05:04
Zorro 2.70
by jcl. 10/13/25 09:01
ZorroGPT
by TipmyPip. 10/12/25 13:58
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 10/11/25 18:45
Reality Check results on my strategy
by dBc. 10/11/25 06:15
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (henrybane, TipmyPip, Quad), 6,198 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Jota, krishna, DrissB, James168, Ed_Love
19170 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 | 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