Game Development Community

T3D 1.1 Beta 3 - Unmount SetActionThread - RESOLVED

by elvince · in Torque 3D Professional · 10/03/2010 (5:44 pm) · 9 replies

Build: 1.1 Beta 3 full template

Platform: Windows 7 64 bit,

Target:Player::setActionThread during unmount

Issues: If you mount an object like the car and then unmount it, the root pose will never come back, you will stay in the Sit sequence pose.

How to reproduce:
1/ Be sure that the sit sequence is not root (you can bind death1 for example)
2/ launch the game
3/ drop a car
4/ mount in the car -> the character should now be in Deatch 1 anim last frames position
5/ click space to unmount

-> The player did not went back to root animation.

Proposed solution:
I found that in player.ccp the function is waiting for a ShapeBase parameter
void Player::onUnmount( ShapeBase *obj, S32 node )

and in ShapeBase the parameter is SceneObject
void ShapeBase::onUnmount( SceneObject *obj, S32 node )

Change the signature in player to : void Player::onUnmount( SceneObject *obj, S32 node )

#1
10/03/2010 (6:00 pm)
Verify that Player::onUnmount() is called.
If it is called ,then try to force NullAnimation instead of RootAnim.
It will reset the playback for a single tick and will continue as usual.
#2
10/04/2010 (6:34 am)
I already checked and OnUnmount is called.

What's the nullAnimation? how do you set it?
#3
10/04/2010 (7:45 am)
in Player::onUnmount() replace

setActionThread(PlayerData::RootAnim,true,false,false);

with

setActionThread(PlayerData::NullAnimation, true, false, false);

and verify that it is called.
#4
10/04/2010 (8:54 pm)
Logged as TQA-1161 for QA to verify
#5
10/05/2010 (7:25 am)
Hi Ivan,

I'm sorry I didn't get properly your first remark for the player::Unmount.
I look in the onUmount in script and not the onUnmount in C++ source code.

And you are right, it is not called. In fact the onUnmount is called at the shapebase level and not at player level.
#6
10/05/2010 (1:18 pm)
You should start from sceneObject::unmountObject() and track the onUnmount() call there.
#7
10/06/2010 (6:50 am)
SO I track it:

Scenobject then ShapeBAse then gamabase

If I look in debug:
obj->onUnmount( this, obj->mMount.node );

Obj = [Player]
This = [Item]

I found that in player.ccp the function is waiting for a ShapeBase parameter
void Player::onUnmount( ShapeBase *obj, S32 node )

and in ShapeBase the parameter is SceneObject
void ShapeBase::onUnmount( SceneObject *obj, S32 node )

I think this is our root cause that explained that we are not go in PLayer class for the Unmount. As I'm not an expert of this part, I will wait for someone confirmation.

I made the change and The test I did was successful

Thanks Ivan for pointing me in the right direction.
#8
01/19/2011 (4:58 pm)
Greetings!

I also reported this here without realizing it had already been reported. You may see that thread for a different suggested fix.

- Dave
#9
04/18/2011 (4:01 pm)
Fixed in 1.1 Final and Preview.