File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -242,7 +242,12 @@ -(float) rotation
242
242
}
243
243
244
244
-(float )rotationalSkewX {
245
- return _rotationalSkewX;
245
+ CCPhysicsBody *body = GetBodyIfRunning (self);
246
+ if (body){
247
+ return -CC_RADIANS_TO_DEGREES (body.absoluteRadians ) + NodeToPhysicsRotation (self.parent );
248
+ } else {
249
+ return _rotationalSkewX;
250
+ }
246
251
}
247
252
248
253
-(void ) setRotationalSkewX : (float )newX
@@ -255,7 +260,12 @@ -(void) setRotationalSkewX: (float)newX
255
260
256
261
-(float )rotationalSkewY
257
262
{
258
- return _rotationalSkewY;
263
+ CCPhysicsBody *body = GetBodyIfRunning (self);
264
+ if (body){
265
+ return -CC_RADIANS_TO_DEGREES (body.absoluteRadians ) + NodeToPhysicsRotation (self.parent );
266
+ } else {
267
+ return _rotationalSkewY;
268
+ }
259
269
}
260
270
261
271
-(void ) setRotationalSkewY : (float )newY
You can’t perform that action at this time.
0 commit comments