File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -101,11 +101,20 @@ var animate = function () {
101101 jump_distance = 0.1 ;
102102 acceleration_step = acceleration ;
103103 doublejumping = true ;
104+ player . rotation . z -= 0.05 ; // poke
104105 }
105106
106107 jumping = true ;
107108 }
108109
110+ if ( player . rotation . z < 0 ) {
111+ player . rotation . z -= 0.05 ;
112+
113+ if ( player . rotation . z < - 3 ) {
114+ player . rotation . z = 0 ;
115+ }
116+ }
117+
109118 if ( jumping || doublejumping ) {
110119 acceleration_step = acceleration_step * ( 1 + acceleration ) ;
111120
@@ -152,6 +161,9 @@ var animate = function () {
152161 trail . position . x = player . position . x ;
153162 trail . position . z = player . position . z ;
154163 trail . position . y = player . position . y ;
164+ trail . rotation . x = player . rotation . x ;
165+ trail . rotation . z = player . rotation . z ;
166+ trail . rotation . y = player . rotation . y ;
155167
156168 trails . push ( trail ) ;
157169
You can’t perform that action at this time.
0 commit comments