Mount Points Messing Up Animation
by Demolishun · in Torque Game Engine · 10/31/2005 (7:29 pm) · 6 replies
Here is a really strange one.
I have created a turret that I am controlling with a mounted player. If the mount point is anywhere that will cause the player model to hit the turret itself the animation of the turret will mess up. The other mount points (used for animation and gun mounts) get moved up in the air and some parts turn faster than others like they are getting different rotation values. If I place the mount point so that the player would be underground (under the tower underground in my case) then the animation if perfect.
I have a couple of questions:
What would cause this?
Is collision turned off for the player when mounted to a shapebase based object by default?
Can I have the player become the turret and delete the player object to prevent this? Then when I unmount recreate the player?
I kind of want the player to be in the turret and not move so that it will not interfere, but that is not necessary.
Thanks,
Frank
I have created a turret that I am controlling with a mounted player. If the mount point is anywhere that will cause the player model to hit the turret itself the animation of the turret will mess up. The other mount points (used for animation and gun mounts) get moved up in the air and some parts turn faster than others like they are getting different rotation values. If I place the mount point so that the player would be underground (under the tower underground in my case) then the animation if perfect.
I have a couple of questions:
What would cause this?
Is collision turned off for the player when mounted to a shapebase based object by default?
Can I have the player become the turret and delete the player object to prevent this? Then when I unmount recreate the player?
I kind of want the player to be in the turret and not move so that it will not interfere, but that is not necessary.
Thanks,
Frank
About the author
I love programming, I love programming things that go click, whirr, boom. For organized T3D Links visit: http://demolishun.com/?page_id=67
#2
Nope.
A very valid way of doing this though it can possibly suffer from a little ghosting lag with the networking.
10/31/2005 (7:56 pm)
Quote:Is collision turned off for the player when mounted to a shapebase based object by default?
Nope.
Quote:Can I have the player become the turret and delete the player object to prevent this? Then when I unmount recreate the player?
A very valid way of doing this though it can possibly suffer from a little ghosting lag with the networking.
#3
I took a look at when the player is in the turret and the player does not move at all. So just being present causes the weird ness.
I guess I will look the collision aspect and/or taking over the turret as a player.
Thanks,
Frank
10/31/2005 (8:09 pm)
Thanks for the reply.I took a look at when the player is in the turret and the player does not move at all. So just being present causes the weird ness.
I guess I will look the collision aspect and/or taking over the turret as a player.
Thanks,
Frank
#4
I turned off collision and I still get this problem. I think there may be something going on with messages sent to the client from the server. It is like the client is getting the wrong information about how the object should be animated. Why this would manifest when the player is in contact or within the object is beyond me. In order to test the collision issue I added a couple of function calls in script for the player. When the player mounts I check to see if this is the turret then call disableCollision on the player. When the player unmounts I do the opposite. I used the standard method to disable collision.
11/03/2005 (9:32 pm)
Update:I turned off collision and I still get this problem. I think there may be something going on with messages sent to the client from the server. It is like the client is getting the wrong information about how the object should be animated. Why this would manifest when the player is in contact or within the object is beyond me. In order to test the collision issue I added a couple of function calls in script for the player. When the player mounts I check to see if this is the turret then call disableCollision on the player. When the player unmounts I do the opposite. I used the standard method to disable collision.
#5
11/06/2005 (12:37 pm)
Okay, I finally removed the collision mesh from my object. Now everything works perfectly. However, I have no collisions with my object now. I have no clue why a collision mesh would mess up mount point locations/animations when I have the collision for the mounted object turned off. Also, with collision off, the camera view does not show the mounted AIPlayer, but when I am a player it shows the AIPlayer.
#6
I went and printed out the transforms for the turret base and the turret gun portion. When the turret gun portion is up in the air versus where it is supposed to be the position transforms are exactly as they should be. The transforms are exactly the same even in both cases. What is interesting is if the AIPlayer is in view by the camera (player camera) the error manifests itself. If the AIPlayer falls out of view of the camera then everything looks correct. Also, when viewed by the free mode camera then everything looks correct as long as collisions are turned off (at least one level) for the AIPlayer. Coincidentally if the collisions are turned off then the free mode camera cannot see the AIPlayer, but the normal player camera can.
So, can someone please explain to me the difference between those two cameras? This may tell me what the problem is.
Thanks,
Frank
11/06/2005 (3:15 pm)
Okay, I think I am getting closer to what the problem is.I went and printed out the transforms for the turret base and the turret gun portion. When the turret gun portion is up in the air versus where it is supposed to be the position transforms are exactly as they should be. The transforms are exactly the same even in both cases. What is interesting is if the AIPlayer is in view by the camera (player camera) the error manifests itself. If the AIPlayer falls out of view of the camera then everything looks correct. Also, when viewed by the free mode camera then everything looks correct as long as collisions are turned off (at least one level) for the AIPlayer. Coincidentally if the collisions are turned off then the free mode camera cannot see the AIPlayer, but the normal player camera can.
So, can someone please explain to me the difference between those two cameras? This may tell me what the problem is.
Thanks,
Frank
Torque Owner Demolishun
DemolishunConsulting Rocks!
Messed up turret (notice Fresh Meat inside turret):
Here is turret with fresh meat in spawn point underground:
So, this is either some scoping thing because if I look at it straight it is not okay or some collision wierd thing with the player?
I will appreciate any insight.