Set Player Visual Action: Difference between revisions

From Pummel Party Mod Documentation
Jump to navigation Jump to search
m (Added gifs)
(Removed warning about this being upcoming content)
 
Line 1: Line 1:
{| class="wikitable"
|-
! Notice !! This content is not available in the current version of Pummel Party. Everything here is subject to change and may or may not be added.
|-
|}
An action that replaces the default player visuals with a given prefab. The player will see themselves as that prefab and can move around as usual. The player's visuals can be reset to the default pummel character visuals by leaving the prefab field empty.
An action that replaces the default player visuals with a given prefab. The player will see themselves as that prefab and can move around as usual. The player's visuals can be reset to the default pummel character visuals by leaving the prefab field empty.



Latest revision as of 20:18, 26 February 2023

An action that replaces the default player visuals with a given prefab. The player will see themselves as that prefab and can move around as usual. The player's visuals can be reset to the default pummel character visuals by leaving the prefab field empty.

Action Settings

The Set Player Visual action in the Action Editor.
Property Description
Targets The gameobject(s) that should be affected by this action. This action only works on players; any other gameobject will be ignored.
Prefab The prefab that will replace the player's current visuals.
Use Player Color When enabled, all props that are not using custom materials will have their tint color set to the player's color.
Vertical Rotation Child This option allows one of the prefab's child gameobjects to be tilted up/down around its pivot point when the player looks up and down.

Note that this setting only affects the 'Third Person' Player Type.
The child selected here cannot be the same as the 'Movement Rotation Child'.

Movement Rotation Child By default the entire prefab is rotated to match the player's facing direction. Instead, this option allows one of the prefab's child gameobjects to be rotated separately towards the player's movement direction.

Note that the player's facing direction and movement direction will be the same when using the 'Top Down' Player Type, unless 'Twinstick Controls' is enabled.
The child selected here cannot be the same as the 'Vertical Rotation Child'.

Details

Player Size and Collisions

The player's collider is a vertical capsule-shaped volume. When using a custom visual prefab, the size of this volume is made to match the size of the prefab.
The height of the capsule will be set to the combined height of the prefab's colliders. Then, the width of the capsule is set to the width of the prefab's colliders on the X or Z axis, whichever is smallest.

For activating triggers and being hit by weapons, the colliders on all of the prefab's objects will be used, not just the player's collision capsule.

If there are any triggers on the player's custom visual prefab, these are excluded from the size calculation, and will not be hit by weapons. They can still activate other triggers in the world, however.

The gameobjects in the player's custom visual will be made non-solid to other players and objects.

Items

When positioning items on the custom prefab, the location of the different item slots will be chosen based on the position of the gameobjects that make up the prefab.

Item Slot Chosen Gameobject
Head Gameobject with the greatest y value.
Left Hand Gameobject with the smallest x value.
Right Hand Gameobject with the greatest x value.
Back Gameobject with the smallest z value.
Body The prefab's root gameobject.

Player Death

When the player dies with a custom visual set, they will keep the custom visual when they respawn. If you want them to respawn without the custom visual, use another Set Player Visual Action with the player's OnRespawn action, and leave the Prefab field blank.

Examples

TankPlayerVisualsExample.gif PlayerVisualsSwitchingExample.gif CustomPlayerItemsExample.gif CustomPlayerVisualTanksExample.gif

Limitations

  • Objects cannot be destroyed while used as a player's visuals.