Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pausing simulator #1688

Closed
Abanoub-G opened this issue May 28, 2019 · 3 comments
Closed

Pausing simulator #1688

Abanoub-G opened this issue May 28, 2019 · 3 comments

Comments

@Abanoub-G
Copy link

I need the simulator to pause while some other piece of script runs which communicates with another piece of software.

From the discussion in issue #1274 I understood that UE4 will wait for the python script to execute world.wait_for_tick() or world.tick() in order for it to run the next tick in the simulator (UE4).

I have done a little test, which is:

while True:
            world.wait_for_tick()

            time.sleep(10)

I was expecting that the simulator will wait 10seconds between each tick, but this didn't happen. Any idea why it is not doing what I am expecting?

Thanks

@nsubiron
Copy link
Collaborator

You need to enable synchronous mode and use world.tick() to step the simulation, take a look at the example synchronous_mode.py.

@Abanoub-G
Copy link
Author

Thanks a lot @nsubiron . That solved it.

@Nitro60zeus
Copy link

Thanks a lot @nsubiron . That solved it.

Can you please share your code to pause simulation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants