2022 Developer Survey is open! Take survey.

New answers tagged

0 votes

2D circle and rotated square collision detection and response

The following approach is probably easy to grasp: You are going to rotate the position of the player around the position of the object. The angle is the additive inverse of inclination of the object (...
user avatar
  • 18.1k
0 votes

Creating a Game in Three.js do i share camera, scene objects?

So i found some code and implemented it to my own needs, i have also added Physics with cannon-es, but anything is posible. ...
user avatar
1 vote
Accepted

How should I share the states amongst all the executions of a Behaviour Tree triggered from all ticks?

As far as I understand, the blackboard is not a state but more a dumping ground for storing things that the AI should know. The blackboard is mutable: each behaviour can read from it and write to it, ...
user avatar
  • 15.4k
1 vote
Accepted

JS 2D top down movement doesn't act as expected

Your issue is that you're clamping the x and y components of the velocity independently. So once the x value hits 100, it saturates. Meanwhile, if the mouse is still above the object, the y value ...
user avatar
  • 113k

Top 50 recent answers are included