question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Creating a follower after using `setPosition` lags the world

See original GitHub issue

Hi.

I’ve currently got followers added in my game world. Followers can be added and removed with no problem.

However, when I attempt to use setPosition before spawning a follower – everything functions well until said follower is spawned in. When the follower is spawned in, the world begins to lag uncontrollably.

Here is the bug in action: https://www.loom.com/share/5a49744b121d44fcad0f423ae0e7baaa I attempted to show you the bug occurring after spawning a follower and then using setPosition, as well as using setPosition prior to any follower spawning.

Note that my follower creation code is simply adding a character and using .follow(). Remove is a bit more complicated than that, but the bug occurs prior to removing a follower.

This video also displays the bug occurring in #273.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
zewa666commented, Apr 14, 2022

@ok1a setPosition takes an optional 3rd param being the layer. have you tried setting that?

1reaction
ok1acommented, Apr 28, 2022

I was thinking of handling this locally, in the meantime, by setting a subscription to follower movements and determining the delta between playerPos and followerPos. If the delta was something like +5 or +10 tiles away, I would despawn the follower.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Two Shooting Drills for the Tuck and Set Point
From the set position, great shooters extend their legs and finish their shot release. Here you can see slow motion shots of Steph...
Read more >
Controller Programming - Webots documentation
The following page describes how to write controller code. Though originally focused on C, most relevant and non language specific details have been...
Read more >
Dreamteck Splines – User Manual
How to get the percent of a Spline Follower along a path? ... Can I use Dreamteck Splines to create an endless runner...
Read more >
instruction manual model dfc-a dancer-follower arm control ...
The DFC-A is intended for installation on a vertical panel using a DIN 35 rail, using the wiring terminals facing down. Figure 1...
Read more >
Space Graphics Toolkit - Documentation - 4.1.0 - Carlos Wilkes
This shows you how to make a more impressive billboard flare using a second layer. Depth. This shows you how to shrink the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found