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.

[Question] Bodies positions.

See original GitHub issue

Hi!

Is there a way to modify a body’s position before it is drawn?

e.g (Which do not work)

Events.on(_engine, 'tick', function (event){
  var circle_pos = circle.position;
  circle_pos = {x: circle_pos.x - viewPort.x, y : circle_pos.y - viewPort.y};
});

Where I want to actually do:

context.arc(x - viewPort.x, y - viewPort.y, radius, sAngle, eAngle);

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
Rodeoclashcommented, Jun 26, 2016

Just wanted to say that I got the camera tracking working well with that snippet you posted. An example here:

http://game.richardson.co.nz/

Thanks for a great library. I’ll drop you another line when the game is done 😃

(Use the arrow keys)

2reactions
liabrucommented, Jun 26, 2016

Looking good, please do 😃 Check out this codepen I found the other day that’s using the engine for a spaceship type game, might be helpful.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Body Positions | Life Skills Quiz
Question 1 · Decubitus Position. Knee-Chest. Fowler Position · Decubitus Position ; Question 2 · Left/Right Lateral Recumbent Position. Knee-Chest. Fowler Position.
Read more >
Quiz & Worksheet - Body Positions for Physical Examination
About This Quiz & Worksheet​​ With this quiz/worksheet, you can find out how much you know about the different body positions for physical...
Read more >
Anatomical Position Quiz Questions And Answers
Here we bring you an amazing quiz! So, play it out now and learn about anatomical positions. The organs in most humans' bodies...
Read more >
Communicating with Nonverbal Cues: Examples of Body ...
We analyze everything from common interview questions to etiquette and how to follow up. Through body language, people can both consciously and ...
Read more >
Two body problem with given start positions and velocities
I am trying to program a n-body problem simulation. To calculate the position and velocity after a time-step I want to split it...
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