MCPcopy Index your code
hub / github.com/EngoEngine/engo / CollisionComponent

Struct CollisionComponent

common/collision.go:492–498  ·  view source on GitHub ↗

CollisionComponent keeps track of the entity's collisions. Main tells the system to check all collisions against this entity. Group tells which collision group his entity belongs to. Extra is the allowed buffer for detecting collisions. Collides is all the groups this component collides with ORe

Source from the content-addressed store, hash-verified

490//
491// Collides is all the groups this component collides with ORed together
492type CollisionComponent struct {
493 // if a.Main & (bitwise) b.Group, items can collide
494 // if a.Main == 0, it will not loop for other items
495 Main, Group CollisionGroup
496 Extra engo.Point
497 Collides CollisionGroup
498}
499
500// CollisionMessage is sent whenever a collision is detected by the CollisionSystem.
501type CollisionMessage struct {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected