Attempt at displaying wheelie effect when using zipper (this was discussed on IRC). Commented out atm since the angle stuff is behaving all weird
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9514 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
99a05b145e
commit
d01724ffc3
@ -5,4 +5,4 @@ HEADER_SEARCH_PATHS = /Library/Frameworks/IrrFramework.framework/Versions/A/Head
|
||||
OTHER_CFLAGS = -Wall -DHAVE_OGGVORBIS=1 -DHAS_SOCKLEN_T -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAS_POLL=1 -DHAS_FCNTL=1 -DHAS_INET_PTON=1 -DHAS_INET_NTOP=1 -DHAS_MSGHDR_FLAGS=1 -DENABLE_NLS=1 -DHAVE_GETTEXT=1 -DHAVE_GLUT=1 -DHAVE_IRRLICHT=1 -DPACKAGE="\"supertuxkart\"" -D__MACOSX__=1 -DHAVE_RTT=0 -DENABLE_BIDI=1 -fvisibility=hidden
|
||||
|
||||
OTHER_LDFLAGS = -lcurl
|
||||
LIBRARY_SEARCH_PATHS = /usr/local/lib /usr/lib
|
||||
LIBRARY_SEARCH_PATHS = /usr/lib /usr/local/lib
|
||||
|
@ -1956,6 +1956,32 @@ void Kart::updateGraphics(float dt, const Vec3& offset_xyz,
|
||||
* speed_ratio * m_skidding*m_skidding;
|
||||
Moveable::updateGraphics(dt, center_shift,
|
||||
btQuaternion(offset_heading, 0, 0));
|
||||
|
||||
/*
|
||||
// cheap wheelie effect
|
||||
if (m_zipper_fire && m_zipper_fire->getCreationRate() > 0.0f)
|
||||
{
|
||||
m_node->updateAbsolutePosition();
|
||||
m_kart_model->getWheelNodes()[0]->updateAbsolutePosition();
|
||||
float wheel_y = m_kart_model->getWheelNodes()[0]->getAbsolutePosition().Y;
|
||||
|
||||
core::vector3df rot = m_node->getRotation();
|
||||
|
||||
float ratio = float(m_zipper_fire->getCreationRate())/float(m_zipper_fire->getParticlesInfo()->getMaxRate());
|
||||
|
||||
const float a = (13.4f - ratio*13.0f);
|
||||
float dst = -45.0f*sin((a*a)/180.f*M_PI);
|
||||
|
||||
rot.X = dst;
|
||||
m_node->setRotation(rot);
|
||||
|
||||
m_node->updateAbsolutePosition();
|
||||
m_kart_model->getWheelNodes()[0]->updateAbsolutePosition();
|
||||
float wheel_y_after = m_kart_model->getWheelNodes()[0]->getAbsolutePosition().Y;
|
||||
|
||||
m_node->setPosition(m_node->getPosition() + core::vector3df(0,wheel_y_after - wheel_y,0));
|
||||
}
|
||||
*/
|
||||
} // updateGraphics
|
||||
|
||||
/* EOF */
|
||||
|
@ -186,5 +186,8 @@ public:
|
||||
|
||||
/** Sets the kart this model is currently used for */
|
||||
void setKart(Kart* k) { m_kart = k; }
|
||||
|
||||
scene::ISceneNode** getWheelNodes() { return m_wheel_node; }
|
||||
|
||||
}; // KartModel
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user