I made a pun multiplayer scene using the pun add on - it worked great !!
made it pseudo 3d and used 2 scripts in order for the players to follow the path (added them here).
Everything works well actually, beside one problem: the players aim only in one direction - Front.
allthough the players can see the rifle turning and aiming towards the mouse, the OTHER PLAYERS wont get that input and see that player constantly aiming front. and the projectiles will actually go only to the front of the player. they wont ACTUALLY aim in the right direction. any idea why ? is there something in the code preventing the players from sending out their aiming vector ?
this script on the players prefabs:
using Opsive.UltimateCharacterController.Character;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class InitHunter : MonoBehaviour
{
void Start()
{
var ultimateCharacterLocomotion = GetComponent<UltimateCharacterLocomotion>();
if (null == ultimateCharacterLocomotion)
{
Debug.LogError("Unable to get character locomotion");
return;
}
PathController.Instance.SetPath(ultimateCharacterLocomotion);
}
}
and this one on the gameobject with the path:
using Opsive.UltimateCharacterController.Character;
using Opsive.UltimateCharacterController.Motion;
using Opsive.UltimateCharacterController.ThirdPersonController.Character.MovementTypes;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PathController : MonoBehaviour
{
public static PathController Instance { get; set; }
private Path _path;
protected void Awake()
{
Instance = this;
_path = GetComponent<Path>();
}
void Start()
{
}
made it pseudo 3d and used 2 scripts in order for the players to follow the path (added them here).
Everything works well actually, beside one problem: the players aim only in one direction - Front.
allthough the players can see the rifle turning and aiming towards the mouse, the OTHER PLAYERS wont get that input and see that player constantly aiming front. and the projectiles will actually go only to the front of the player. they wont ACTUALLY aim in the right direction. any idea why ? is there something in the code preventing the players from sending out their aiming vector ?
this script on the players prefabs:
using Opsive.UltimateCharacterController.Character;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class InitHunter : MonoBehaviour
{
void Start()
{
var ultimateCharacterLocomotion = GetComponent<UltimateCharacterLocomotion>();
if (null == ultimateCharacterLocomotion)
{
Debug.LogError("Unable to get character locomotion");
return;
}
PathController.Instance.SetPath(ultimateCharacterLocomotion);
}
}
and this one on the gameobject with the path:
using Opsive.UltimateCharacterController.Character;
using Opsive.UltimateCharacterController.Motion;
using Opsive.UltimateCharacterController.ThirdPersonController.Character.MovementTypes;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PathController : MonoBehaviour
{
public static PathController Instance { get; set; }
private Path _path;
protected void Awake()
{
Instance = this;
_path = GetComponent<Path>();
}
void Start()
{
}