Vehicles and movers

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

FatalOverdose

New Member
Oct 13, 2003
6
0
0
Hi,
is it possible to gain a valid ref to a Vehicle from the Mover class? I have tried changing the properties of bBlockactors and bCollideactors and managed to get the Touch() function working but i still cant get a ref to a vehicle, any actor lower than pawn in the class tree is still returning as none .
 
Last edited by a moderator:

pospi

New Member
Jun 30, 2003
298
0
0
www.pospi.cjb.net
But vehicles are higher in the tree. Wait, scratch that, it just depends on the way you view the tree doesnt it.

I would suggest trying one of the iterator functions like TouchingActors(), that may give you some luck. However I think there are some problems with vehicles and collision - mainly wheeled ones though. I'm pretty sure a vehicle's chassis has to be touching something for it to register - the wheels are handled differently and I'm pretty sure it doesnt count them as touching. At least, it won't send KImpact() events when you fall for thousands of meters and land on your wheels.
 

FatalOverdose

New Member
Oct 13, 2003
6
0
0
Thanks . But it didnt work to well for some reason so i used visiblecollidingactors with a few other conditions to get the job done. But while writing this post ive just realised once i have a valid ref to the vehicle i could use an iterator to try to detect the mover but from the beased from the vec, a sort of confimation check;-

Code:
Function bump(actor other)
{
local onsvehicle foundVec;
local onsvehicle foundmover;

super.bump(other);

if (!other.isa('xpawn')) return; 
ForEach VisibleCollidingActors(class'OnsVehicle',FoundVec,128);
           {
            ForEach Touchingactors(Class'Mover',FoundMover);
                      {
                       if (FoundMover==self)
                           {
                             // do whatever
                           }
                      }
            }

}
 
Last edited by a moderator: