Got moving platform working..sort of. Need help!
by Mark Harmon · in Torque Game Engine · 11/08/2003 (10:10 am) · 50 replies
I took the code from HEAD and started messing with it to get elevators, moving platform and doors working using the pathedInterior class. I've got the exporting and importing fine and I can make the pathedInterior move along the waypoints.
My current test dif has a platform that moves along a path shaped like a triangle with three waypoints. I did this to test horizontal, vertical and diagonal movement.
The problem I am having is that the player won't move smoothly with the platform . The player will sometimes move smoothly while moving horizontally.
My current test dif has a platform that moves along a path shaped like a triangle with three waypoints. I did this to test horizontal, vertical and diagonal movement.
. wp2
wp0 . . wp1The problem I am having is that the player won't move smoothly with the platform . The player will sometimes move smoothly while moving horizontally.
#2
One other thing I noticed is that when I shoot the crossbow at the moving platform, the projectile goes right through it. I think that is unrelated, but just wanted to throw that out there.
11/08/2003 (5:38 pm)
Thanks for the reply Ben, but I'm not sure what you mean exactly. Are you suggesting that the Player::processTick() method needs to be called after the PathedInterior::processTick() or something else? The resolveDisplacement() method calls the Player::displaceObject() which in turn calls Player::updatePos(). I thought that was enough. Obviously it isn't.One other thing I noticed is that when I shoot the crossbow at the moving platform, the projectile goes right through it. I think that is unrelated, but just wanted to throw that out there.
#3
11/08/2003 (6:10 pm)
@Mark, are these the only changes you made to get this working?
#4
11/08/2003 (7:38 pm)
@Desmond: MarkF did a lot of changes in pathedInterior a while back to make them work.
#5
Xavier: The code in HEAD is farther along than before, but still incomplete. I learned a lot by checking out badguy's preliminary doors resource. The problem with that resource is that now it won't work with all the new code changes in HEAD.
I'll post the exporter code changes soon. I need to get the trigger and ai nodes exporting correctly first.
11/08/2003 (8:51 pm)
Desmond: No, I also made changes to the exporting and importing routines. I think the code relevant to the problem is all posted above though.Xavier: The code in HEAD is farther along than before, but still incomplete. I learned a lot by checking out badguy's preliminary doors resource. The problem with that resource is that now it won't work with all the new code changes in HEAD.
I'll post the exporter code changes soon. I need to get the trigger and ai nodes exporting correctly first.
#6
11/09/2003 (2:21 pm)
Thx Mark, If you could send or post your exporter changes to date that would be great. I have been working on this also and am also trying to figure out how to circumvent the magicButton. I want level editors to be able to bring in the interiors and doors without so much trouble.
#7
11/09/2003 (4:31 pm)
I am working on a resource for this. I will post it when I have it working right. The necessary code changes are scattered around the code and I want to make it worth the effort to apply them. I expect to be done in a couple of days though, so you won't have to wait long.
#8
11/10/2003 (4:25 pm)
I'm making some progress. I've got the problem fixed that was keeping the player from stepping up to the pathed interior. I've also got the projectiles colliding with the pathed interior, but that has caused a problem in SceneObject::getLightingAmbientColor(ColorF * col). I need to add a special case for the pathed interior object or I get a fatal assertion. That's because I had to implement castRay() for the pathedInterior class.
#9
11/10/2003 (6:44 pm)
Is your castRay not fully implemented?
#10
I am thinking that the server's copy of the player is conflicting with what the client has. I am getting a "packetDataChecksum disagree!" when the platform is sliding away from under the player's feet.
11/10/2003 (9:45 pm)
I copied it from InteriorInstance. It's working now. I had to add a new object type for pathed interiors. That way the cast ray can bypass it when getting the current ambient lighting. I figure there's no reason for getting it from the pathedInterior, which was happening when it had the InteriorObjectType flag set.I am thinking that the server's copy of the player is conflicting with what the client has. I am getting a "packetDataChecksum disagree!" when the platform is sliding away from under the player's feet.
#11
11/18/2003 (8:50 am)
I finally got this all working. It is pretty bare-bones at this point. There are no sounds and when multiple door parts reference a single trigger, the loader creates multiple copies of the trigger. I am not sure if I should post a resource now or wait until all the bells and whistles are in.
#12
11/18/2003 (8:59 am)
Works reliably? What was the trick?
#13
11/18/2003 (10:00 am)
@Mark: Maybe you can post what you have in a thread here and let others help you finish it.
#14
11/18/2003 (4:56 pm)
I have been tracking all my code changes to date and the two texts files combined, have over 500 lines. So it's questonable whether there are too many steps to perform to make it work. That doesn't count the reworked pathedInterior source files. I will try and simplify it and then post the first resource.
#15
11/18/2003 (6:25 pm)
Excellent!
#16
11/18/2003 (6:41 pm)
Mark, maybe you can put it in a patch file and send it to Tim for review, they might want to add this into the HEAD.
#17
If I make a patch it will pick up any changes I make to fix that.
11/18/2003 (9:12 pm)
I would make a patch if the Torque lib file would compile in HEAD. I get all kinds of errors about not being able to find vorbis/codec.hIf I make a patch it will pick up any changes I make to fix that.
#18
btw. I applied the patch after a clean update from CVS.
11/18/2003 (10:03 pm)
I tried to make a patch for the ogg vorbis compiler problem and I get the following error after trying to apply my patch. I synced to HEAD first and remade patch twice and still get the error.can't find file to patch at input line 85 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: vc7/Torque Lib.vcproj |=================================================================== |RCS file: /cvs/torque/torque/vc7/Torque Lib.vcproj,v |retrieving revision 1.4 |diff -u -r1.4 Torque Lib.vcproj |--- vc7/Torque Lib.vcproj 2003/10/08 22:18:00 1.4 |+++ vc7/Torque Lib.vcproj 2003/11/19 05:25:41 -------------------------- File to patch: Skip this patch? [y] Skipping patch. 2 out of 2 hunks ignored
btw. I applied the patch after a clean update from CVS.
#19
Why do you need Torque Lib?
11/18/2003 (10:07 pm)
See this thread - www.garagegames.com/mg/forums/result.thread.php?qt=13068Why do you need Torque Lib?
#20
The space in the file name "Torque Lib.vcproj" is causing a problem when patching under WindowsXP. I verified this by removing the space from the name and modifying the patch file, the patch worked.
I am looking for a workaround. I tried adding quotes but that doesn't help.
11/19/2003 (6:45 am)
You need it to link with some of the tools.The space in the file name "Torque Lib.vcproj" is causing a problem when patching under WindowsXP. I verified this by removing the space from the name and modifying the patch file, the patch worked.
I am looking for a workaround. I tried adding quotes but that doesn't help.
Associate Kyle Carter