0
votes

I am trying to accomplish a slow motion effect in my game. So far I am using the physics world speed property

 self.physicsWorld.speed = 0.4

and it works great.

However the problem I am having is that in my scenes certain other Nodes use physics bodies to do things such as shooting with impulses. This means if my player enters slow-motion all other nodes using a physics body are also slowed down.

Can I achieve the same effect but make it apply only to my player?

I have been playing around with the speed and velocity property of the player but cannot seem to get the same effect as slowing down the physics world.

Has anyone got some suggestions please?

1
Is it possible to just set the speed of the other nodes to 1/0.4?Hayden Holligan
Hey, thanks for your answer. The main issue is that the other nodes use an impulse to shoot. So I can't just reduce the speed as far as I know. I am considering changing the impulse action to an SKAction.moveTo... action. I would prefer to avoid that tho.crashoverride777
you could amplify the impulse during slow motion. Multiply it by a factor that gives the desired result.Confused
hey, thanks for your help. I am not exactly sure that would work because the impulse applies to random objects in my game. I ended up using SKAction instead. I am still curious tho if there is another waycrashoverride777

1 Answers

0
votes

Basically there is 2 options I found.

1) As recommended by Confused I can multiply the impulses by a factor proportionate to the slowMo value.

2) Use SKActions