Download

How to make Actor that blocks Pawns and also ignores other's Collision and can move completely freely?

I need to make Actor that would either move together with its Owner (using Move function in Tick, however I also need this Actor to block Pawns that are not its Owner but be able to move freely just like Owner.


With defaultproperties set like on image, Actor does block other Pawns but does not always follow Owner because something is on its way. I’m not changing any of the defaultproperties during run-time. Is it possible to make this Actor not being blocked by anything but be able to block Pawns?
Actor I am making can’t be based on its Owner because I am making this Actor to be a “collision” of player and the game can’t handle other player Pawn becoming based on Actor that is based on another player Pawn.

Can you make youtube video about the problem?

Hi @Shararamosh! Welcome to the forum. So you’re working on a UE3/UDK project? That’s kind of surprising for the year 2021.

Is there a reason why you can’t just use the pawn’s collision cylinder? That will block other pawns and it will move with your pawn.

From Pawn.uc

Begin Object Class=CylinderComponent Name=CollisionCylinder
	CollisionRadius=+0034.000000
	CollisionHeight=+0078.000000
	BlockNonZeroExtent=true
	BlockZeroExtent=true
	BlockActors=true
	CollideActors=true
End Object
CollisionComponent=CollisionCylinder
CylinderComponent=CollisionCylinder
Components.Add(CollisionCylinder)

Well, it’s a mod for A Hat in Time. The idea is this: there’s a scooter mesh that is directly attached to the player’s Pawn and player mesh is attached to this scooter mesh. What I want to do is to make a sort of collision Actor that would:

  1. Always have same location and rotation as player and have a collision that would cover scooter mesh.
  2. Be able to block other Pawns and be able to call Bump event when another Pawn is bumping into it.
    My main issue is that with such defaultproperties as shown on the screenshot, collision Actor stops following player when it bumps to the Pawn. In the past I’ve used SetBase and SetHardAttach to base collision Actor on player, but that created a bug that seems to be existing for A Hat in Time only - when another player Pawn gets based on the collision Actor the game crashes. That’s why I would rather not use SetBase and use Move function in Tick instead.

I would take a look at the Vehicle.uc class. Essentially it is treated as a pawn and your controller possesses it. Then you hard attach your original pawn to the vehicle pawn (if i remember correctly).