supertux
Classes | Public Member Functions | List of all members
CollisionGroundMovementManager Class Referencefinal

This class takes care of moving objects that have collided on top of other moving objects or on top of moving solid tiles. More...

#include <collision_movement_manager.hpp>

Public Member Functions

void register_movement (CollisionObject &moving_object, CollisionObject &target_object, const Vector &movement)
 
void register_movement (TileMap &moving_tilemap, CollisionObject &target_object, const Vector &movement)
 
void apply_all_ground_movement ()
 Moves all target objects according to their colliding object or tilemap whose movement vector has the lowest "y" coordinate. More...
 

Detailed Description

This class takes care of moving objects that have collided on top of other moving objects or on top of moving solid tiles.

This step is performed after the object updates and before the collision detection.

Member Function Documentation

◆ apply_all_ground_movement()

void CollisionGroundMovementManager::apply_all_ground_movement ( )

Moves all target objects according to their colliding object or tilemap whose movement vector has the lowest "y" coordinate.

In other words: this makes sure objects always move up in case one of the colliding objects does.


The documentation for this class was generated from the following files: