Monad Engine da02fba2
> Undercity Codex_
Loading...
Searching...
No Matches
JumpPlatform.cpp
Go to the documentation of this file.
1#include "JumpPlatform.h"
2
4{
5 auto physics = GetComponent<eng::PhysicsComponent>();
6 if (physics)
7 {
8 auto rigidBody = physics->GetRigidBody();
9 if (rigidBody)
10 {
11 rigidBody->AddContactListener(this);
12 }
13 }
14}
15
18 const glm::vec3& pos,
19 const glm::vec3& norm)
20{
22 {
23 auto controller = static_cast<eng::KinematicCharacterController*>(obj);
24 if (controller)
25 {
26 controller->Jump(glm::vec3(0.0f, 20.0f, 0.0f));
27 }
28 }
29}
void OnContact(eng::CollisionObject *obj, const glm::vec3 &pos, const glm::vec3 &norm) override
void Init() override
CollisionObjectType GetCollisionObjectType()