allow better customisation of kart::getHeading method
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@2209 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
11cc33e709
commit
eeaf9a0295
@ -104,7 +104,7 @@ Kart::Kart (const std::string& kart_name, int position,
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
btTransform Kart::getKartHeading()
|
||||
btTransform Kart::getKartHeading(const float customPitch)
|
||||
{
|
||||
btTransform trans = this->getTrans();
|
||||
|
||||
@ -115,7 +115,7 @@ btTransform Kart::getKartHeading()
|
||||
float heading=atan2(-direction.getX(), direction.getY());
|
||||
|
||||
TerrainInfo::update(this->getXYZ());
|
||||
float pitch = getTerrainPitch(heading);
|
||||
float pitch = (customPitch == -1 ? getTerrainPitch(heading) : customPitch);
|
||||
|
||||
btMatrix3x3 m;
|
||||
m.setEulerZYX(pitch, 0.0f, heading);
|
||||
|
Loading…
x
Reference in New Issue
Block a user