Skip to content

GitLab

    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    • Menu
    Projects Groups Snippets
  • Get a free trial
  • Sign up
  • Login
  • Sign in / Register
  • solarus solarus
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 229
    • Issues 229
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 10
    • Merge requests 10
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Solarus Games
  • solarussolarus
  • Issues
  • #748
Closed
Open
Created Aug 26, 2015 by Diarandor@DiarandorDeveloper

Request: function entity:has_collision(collision_test, other_entity)

It would be nice to be able to use the tests of the engine used to detect collisions in the function custom_entity:add_collision_test(collision_test, callback).

To detect if two given custom entities are in collision (relative to some collision test) at a precise moment, it is not a good idea to add a collision test since you need to check the collision just once and you know when. It would be better to call the corresponding collision test function.

This is not possible yet, I think, except for the function entity:overlaps(other_entity), which is the test function used in the method custom_entity:add_collision_test("overlapping", callback). But, for instance, we do not have a method like entity:is_facing(other_entity), etc.

To make the syntax simpler, I would suggest to have a function like: entity:has_collision(collision_test, other_entity), or something similar, where collision_test is a string representing one of the collision test functions used by the engine (which are not directly accesible at present), like "facing", "touching", "containing" and "sprite".

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking