mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-14 16:14:38 +00:00
Player Mounting
Removes the z axis rotation for consistency with other mounted object types.
This commit is contained in:
parent
a285b7b07b
commit
037ee82982
1 changed files with 8 additions and 8 deletions
|
|
@ -5316,10 +5316,10 @@ void Player::setPosition(const Point3F& pos,const Point3F& rot)
|
||||||
MatrixF mat;
|
MatrixF mat;
|
||||||
if (isMounted()) {
|
if (isMounted()) {
|
||||||
// Use transform from mounted object
|
// Use transform from mounted object
|
||||||
MatrixF nmat,zrot;
|
//MatrixF nmat,zrot;
|
||||||
mMount.object->getMountTransform( mMount.node, mMount.xfm, &nmat );
|
mMount.object->getMountTransform( mMount.node, mMount.xfm, &mat );
|
||||||
zrot.set(EulerF(0.0f, 0.0f, rot.z));
|
//zrot.set(EulerF(0.0f, 0.0f, rot.z));
|
||||||
mat.mul(nmat,zrot);
|
//mat.mul(nmat,zrot);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
mat.set(EulerF(0.0f, 0.0f, rot.z));
|
mat.set(EulerF(0.0f, 0.0f, rot.z));
|
||||||
|
|
@ -5338,10 +5338,10 @@ void Player::setRenderPosition(const Point3F& pos, const Point3F& rot, F32 dt)
|
||||||
MatrixF mat;
|
MatrixF mat;
|
||||||
if (isMounted()) {
|
if (isMounted()) {
|
||||||
// Use transform from mounted object
|
// Use transform from mounted object
|
||||||
MatrixF nmat,zrot;
|
//MatrixF nmat,zrot;
|
||||||
mMount.object->getRenderMountTransform( dt, mMount.node, mMount.xfm, &nmat );
|
mMount.object->getRenderMountTransform( dt, mMount.node, mMount.xfm, &mat );
|
||||||
zrot.set(EulerF(0.0f, 0.0f, rot.z));
|
//zrot.set(EulerF(0.0f, 0.0f, rot.z));
|
||||||
mat.mul(nmat,zrot);
|
//mat.mul(nmat,zrot);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
EulerF orient(0.0f, 0.0f, rot.z);
|
EulerF orient(0.0f, 0.0f, rot.z);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue