MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / SnapItemToLedge

Function SnapItemToLedge

TombEngine/Game/collision/collide_room.cpp:30–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30void SnapItemToLedge(ItemInfo* item, CollisionInfo* coll, float offsetMultiplier, bool snapToAngle)
31{
32 item->Pose.Translate(coll->NearestLedgeAngle, coll->NearestLedgeDistance + (coll->Setup.Radius * offsetMultiplier));
33 item->Pose.Orientation = EulerAngles(
34 0,
35 snapToAngle ? coll->NearestLedgeAngle : item->Pose.Orientation.y,
36 0);
37}
38
39void SnapItemToLedge(ItemInfo* item, CollisionInfo* coll, short angle, float offsetMultiplier)
40{

Callers 10

TestLaraHangFunction · 0.85
TestLaraHangJumpFunction · 0.85
TestLaraHangJumpUpFunction · 0.85
TestLaraWaterClimbOutFunction · 0.85
lara_col_crawl_to_hangFunction · 0.85
DoLaraCrawlToHangSnapFunction · 0.85
SetLaraVaultFunction · 0.85
SlopeMonkeyExtraFunction · 0.85
SnapItemToGridFunction · 0.85

Calls 3

GetNearestLedgeAngleFunction · 0.85
EulerAnglesClass · 0.50
TranslateMethod · 0.45

Tested by 5

TestLaraHangFunction · 0.68
TestLaraHangJumpFunction · 0.68
TestLaraHangJumpUpFunction · 0.68
TestLaraWaterClimbOutFunction · 0.68