For direct access use https://forums.oldunreal.com
It's been quite a while since oldunreal had an overhaul, but we are moving to another server which require some updates and changes. The biggest change is the migration of our old reliable YaBB forum to phpBB. This system expects you to login with your username and old password known from YaBB.
If you experience any problems there is also the usual "password forgotten" function. Don't forget to clear your browser cache!
If you have any further concerns feel free to contact me: Smirftsch@oldunreal.com
It's been quite a while since oldunreal had an overhaul, but we are moving to another server which require some updates and changes. The biggest change is the migration of our old reliable YaBB forum to phpBB. This system expects you to login with your username and old password known from YaBB.
If you experience any problems there is also the usual "password forgotten" function. Don't forget to clear your browser cache!
If you have any further concerns feel free to contact me: Smirftsch@oldunreal.com
Issue #44. Double call to Trigger.Touch when touching a Trigger just once
- Masterkent
- OldUnreal Member
- Posts: 1469
- Joined: Fri Apr 05, 2013 12:41 pm
Issue #44. Double call to Trigger.Touch when touching a Trigger just once
Sometimes entering the collision cylinder of a Trigger results in two calls to Trigger.Touch. This may lead to unwanted effects, such as doubled triggered messages and double toggling. A double toggling can be very frequently observed on SkyBase.unr (when you try to use some button that controls a door, the corresponding trigger often activates the door even number of times resulting in an opening followed by an immediate closing or a closing followed by an immediate opening).
Whenever Touch is called twice per single approach, the first call takes place when the collision cylinders of the player and the trigger do not intersect, and such a call is followed by the corresponding call to UnTouch on the same tick. The next call to Touch is then performed on the next tick, when the collision cylinders intersect:
Whenever Touch is called twice per single approach, the first call takes place when the collision cylinders of the player and the trigger do not intersect, and such a call is followed by the corresponding call to UnTouch on the same tick. The next call to Touch is then performed on the next tick, when the collision cylinders intersect:
Last edited by Masterkent on Wed Feb 01, 2017 10:13 am, edited 1 time in total.
- Leo T_C_K
- OldUnreal Member
- Posts: 3673
- Joined: Sat Aug 27, 2005 6:24 pm
RE: Issue #44. Double call to Trigger.Touch when touching a Trigger just once
zeur confirms:
"(due to a whirlwind of events I haven't gotten around to implementing hyper's proposed solution, or just about anything else with the craptop, so STFU about that)
--zeur."
"(due to a whirlwind of events I haven't gotten around to implementing hyper's proposed solution, or just about anything else with the craptop, so STFU about that)
Present in 225f. Noticed it when writing korax.ProximityDoor. Didn't make the link w/ the SkyBase door (which I'm otherwise well aware of), though.Sometimes entering the collision cylinder of a Trigger results in two calls to Trigger.Touch. This may lead to unwanted effects, such as doubled triggered messages and double toggling. A double toggling can be very frequently observed on SkyBase.unr (when you try to use some button that controls a door, the corresponding trigger often activates the door even number of times resulting in an opening followed by an immediate closing or a closing followed by an immediate opening)."
I haven't confirmed that part, but it sounds likely.Whenever Touch is called twice per single approach, the first call takes place when the collision cylinders of the player and the trigger do not intersect, and such a call is followed by the corresponding call to UnTouch on the same tick. The next call to Touch is then performed on the next tick, when the collision cylinders intersect:
[snip ad]
--zeur."
Last edited by Leo T_C_K on Wed Feb 01, 2017 10:50 am, edited 1 time in total.
- )Leela(-[otS]-
- OldUnreal Member
- Posts: 205
- Joined: Tue May 31, 2011 7:30 pm
Re: Issue #44. Double call to Trigger.Touch when touching a Trigger just once
This is one of the most annoying things with Triggers and Movers set to TriggerToggle when Players or other Pawns touching the Trigger directly.
I can't count how many workarounds I made for such situations and it was even worse when the Movers or Triggers also were set to TriggerOnceOnly.
I really hope, that this annoying "double call" problem can somehow be fixed in the future.
I can't count how many workarounds I made for such situations and it was even worse when the Movers or Triggers also were set to TriggerOnceOnly.
I really hope, that this annoying "double call" problem can somehow be fixed in the future.
- Leo T_C_K
- OldUnreal Member
- Posts: 3673
- Joined: Sat Aug 27, 2005 6:24 pm
RE: Issue #44. Double call to Trigger.Touch when touching a Trigger just once
zeur sighs:
"
--zeur.
[1] I wouldn't mind breaking compat if Unreal were rewritten altogether, but alas, that ain't going to happen anytime soon..."
"
Yeah, this kind of problem made me invent korax.ActionSpecial in the first place. That and UnrealBloat(tm).This is one of the most annoying things with Triggers and Movers set to TriggerToggle when Players or other Pawns touching the Trigger directly.
I can't count how many workarounds I made for such situations and it was even worse when the Movers or Triggers also were set to TriggerOnceOnly.
Let's just hope the fix won't break too much existing stuff.[1]I really hope, that this annoying "double call" problem can somehow be fixed in the future.
--zeur.
[1] I wouldn't mind breaking compat if Unreal were rewritten altogether, but alas, that ain't going to happen anytime soon..."
- Masterkent
- OldUnreal Member
- Posts: 1469
- Joined: Fri Apr 05, 2013 12:41 pm
Re: Issue #44. Double call to Trigger.Touch when touching a Trigger just once
Actually that's demonstrated on the video that you called "ad" (LOL). I modified the UScript code of Engine.Trigger so it indicated the horizontal and vertical overlapping of the collision cylinders of the trigger and the pawn. Negative values imply no overlapping. The game performed ~60 ticks per second, and the number of ticks between the adjacent messages can be calculated based on the time stamps.I haven't confirmed that part, but it sounds likely.Whenever Touch is called twice per single approach, the first call takes place when the collision cylinders of the player and the trigger do not intersect, and such a call is followed by the corresponding call to UnTouch on the same tick. The next call to Touch is then performed on the next tick, when the collision cylinders intersect:
[snip ad]
Last edited by Masterkent on Wed Feb 01, 2017 11:36 am, edited 1 time in total.
- Leo T_C_K
- OldUnreal Member
- Posts: 3673
- Joined: Sat Aug 27, 2005 6:24 pm
RE: Issue #44. Double call to Trigger.Touch when touching a Trigger just once
zeur snarks:
"
--zeur."
"
Mesupposes mecould've called it 'goo''.Actually that's demonstrated on the video that you called "ad" (LOL).
Ah, thanks for the exposition.I modified the UScript code of Engine.Trigger so it indicated the horizontal and vertical overlapping of the collision cylinders of the trigger and the pawn. Negative values imply no overlapping.
Hold on, isn't there a way to access the tick count using UShit? Me's never had to try...The game performed ~60 ticks per second, and the number of ticks between the adjacent messages can be calculated based on the time stamps.
--zeur."
- Smirftsch
- Administrator
- Posts: 8999
- Joined: Wed Apr 29, 1998 10:00 pm
- Location: NaPali
- Contact:
Re: Issue #44. Double call to Trigger.Touch when touching a Trigger just once
checking the code it appears that both SetCollision and SetCollisionSize do untouch/touch and do this only by determining bCollideActors. Wouldn't be surprised that to be related to it somehow. Need to start logging now...
Last edited by Smirftsch on Wed Jun 06, 2018 5:27 am, edited 1 time in total.
Sometimes you have to lose a fight to win the war.
- Masterkent
- OldUnreal Member
- Posts: 1469
- Joined: Fri Apr 05, 2013 12:41 pm
Re: Issue #44. Double call to Trigger.Touch when touching a Trigger just once
Unlikely SetCollision or SetCollisionSize are related to this issue. In ConformanceTest_Touch.RunTest, there are two evaluations of A.Move(vect(0, 1, 0)):
The former evaluation slightly moves the Trigger (call it A) towards the ConformanceTest_Touch actor (call it B) so that A doesn't actually reach B (their collision cylinders don't overlap yet), but this call to Move invokes Touch and UnTouch somehow. Then the second evaluation slightly moves A towards B farther (in exactly the same direction) so that the collision cylinders of A and B become overlapping and Touch is invoked again.
Code: Select all
SetCollision(true, false, false);
SetCollisionSize(40, 40);
SpawnLocation = vect(-4.529744, -58.626865, 0);
A = Spawn(class'Trigger',, 'ConformanceTest_Touch', SpawnLocation);
A.SetCollisionSize(17, 39);
A.Move(vect(0, 1, 0));
A.Move(vect(0, 1, 0));
if (!bHadValidTouch)
{
LogError("Touch was not called for intersecting cylinders");
LogParam("Horizontal intersection of the cylinders", -HorizontalDistanceTo(A));
}
Last edited by Masterkent on Wed Jun 06, 2018 9:07 am, edited 1 time in total.
- Smirftsch
- Administrator
- Posts: 8999
- Joined: Wed Apr 29, 1998 10:00 pm
- Location: NaPali
- Contact:
Re: Issue #44. Double call to Trigger.Touch when touching a Trigger just once
nvm that first assumption. After some logging I found that MoveActor didn't do a cylinder check before initiating BeginTouch, but UnTouch check again directly after that did it.
I added it and it seems to do fine, also passing your test. It's now slightly more expensive, but I doubt its much of a problem here.
Will do some playtesting later yet.
I added it and it seems to do fine, also passing your test. It's now slightly more expensive, but I doubt its much of a problem here.
Will do some playtesting later yet.
Last edited by Smirftsch on Wed Jun 06, 2018 10:27 am, edited 1 time in total.
Sometimes you have to lose a fight to win the war.