hey All.
I was looking into how to make a breating view, but is stuck at shake...
Can anyone helps me on this? I want the view to move slowly up and down.
Kind Regards
Toke
how to make "Breathing view"
Started by Toke_dk, Jul 05 2012 06:01 PM
6 replies to this topic
#1
Posted 05 July 2012 - 06:01 PM
#2
Posted 05 July 2012 - 06:02 PM
sine()
#3
Posted 05 July 2012 - 06:13 PM
sine()
Can you please elaburate. I looked at sin/cos object, but couldn't find anything on view.
Kind regards
Toke
#4
Posted 05 July 2012 - 06:14 PM
Sorry, don't get me wrong but WHAT? Even i as fairly familiar with GML don't have a clue about what this is...sine()
Can your post have a bit less info?
#5
Posted 05 July 2012 - 07:09 PM
sine()
Can you please elaburate. I looked at sin/cos object, but couldn't find anything on view.
Kind regards
Toke
lol
i meant sin()
#6
Posted 05 July 2012 - 07:19 PM
In a new object, add this to the create event:
In the step event, add this:
You can modify the breathing_speed, and the breathing_offset to fit your needs
global.breathing=1 breathing_speed=5 breathing_offset=10 _s=0
In the step event, add this:
if global.breathing=1{
view_yview[0]=0+sin(_s)*breathing_offset
_s+=breathing_speed/20
_s=_s mod 360
}else{
view_yview[0]=0
}You can modify the breathing_speed, and the breathing_offset to fit your needs
Edited by Southman, 05 July 2012 - 07:20 PM.
#7
Posted 06 July 2012 - 12:33 PM
In a new object, add this to the create event:
global.breathing=1 breathing_speed=5 breathing_offset=10 _s=0
In the step event, add this:if global.breathing=1{ view_yview[0]=0+sin(_s)*breathing_offset _s+=breathing_speed/20 _s=_s mod 360 }else{ view_yview[0]=0 }
You can modify the breathing_speed, and the breathing_offset to fit your needs
That worked perfect, thank you!
Edited by Toke_dk, 06 July 2012 - 12:35 PM.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











