Is it possible to define more accurate custom shape collision box rather than rectangle for an Entity? Please let me know if it is possible and how?
Is it possible to define more accurate custom shape collision box rather than rectangle for an Entity?
490 Views Asked by Roozbeh Sharafi At
1
There are 1 best solutions below
Related Questions in COLLISION
- Brick Breaker Ball Bounce
- I am trying to make a Turtle Eater Game and I'm running into a minor bug(kind of)
- Points system in Unity not working. I want to count points but make both objects disappear and it's not working
- How to make wall collision with staticbody2d & collisionshape2d ( using an area2D for player with collisionshape2d as a child ) in GODOT?
- How do you get the numerical values in this collision function
- Pygame slows down after Collision Handling PacMan
- Problem with a wall collision on a map loaded from a png file (like the raylib maze example)
- How to make collisions with rects in pygame
- pygame collisions while character is on a tile
- onCollisionEnter is not working in r3f how can i fix it?
- How to handle collision after a diagonal movement with rectangles
- Inverting a hitbox
- Gamemaker collisions
- Python Pygame Platformer
- Java Ball Movement: Unexpected Behavior with Boundary Reflections
Related Questions in IMPACTJS
- Can't make a remote character smooth using interpolation
- Import and use debugout.js with an impact.js project
- Game character in the browser game appears on Android, but not on iOS
- Making a bot for impactjs-game
- Pact-JS - Get pact verification response
- Is there a way to convert a game made with ImpactJS to Unity?
- How to prevent duplicate server calls on game logic (multiplayer)?
- ImpactJS moving toward entity
- Clone an ImpactJS ig.Class instance
- Extending oversized image ABOVE tile rather than below? ImpactJS
- Mobile Safari (iOS8) crashing during HTML5 Canvas based game
- Allow user to enter an email address in impactjs
- Font not displaying on canvas
- Jquery and Socket.io conflict
- How does Impact know whether a device is a desktop, a mobile phone, a tablet, etc (Any Device)?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Of course it is possible, and there are multiple possible solutions:
However, Box2D is a bit heavy if you only want to do some custom shape collision.
ig.Game.checkEntities, this allows you to loop through all entities in the game and check their collisions the way you want to.ig.Entity.check, for lazy people like myself, and only when the custom shape is contained within the entity's rectangle, you can do the entity shape collision check within this function (after entity rectangle collision has already occurred).ig.Entity.checkexample: