|
Post by benisagreatguy on Jun 10, 2023 15:56:47 GMT
I've tried multiple messages after reading every post I can find.
I AM using MIS but doesn't seem like that should matter as its just a wrapper around the basic classes.
In my current iteration I am doing the following:
public GameObject player_character; //this is set to the current invector player
player_character.GetComponent<com.mobilin.games.mvThirdPersonController>().freeSpeed.walkSpeed = boosted_walk_speed;
player_character.GetComponent<com.mobilin.games.mvThirdPersonController>().freeSpeed.runningSpeed = boosted_run_speed;
player_character.GetComponent<com.mobilin.games.mvThirdPersonController>().freeSpeed.sprintSpeed = boosted_sprint_speed;
player_character.GetComponent<com.mobilin.games.mvThirdPersonController>().SetControllerMoveSpeed(player_character.GetComponent<com.mobilin.games.mvThirdPersonController>().freeSpeed);
I've spent days on this at multiple points in my project and don't see what I am missing. Much harder to change than health vars.
|
|
|
Post by Invector on Jun 29, 2023 13:20:37 GMT
just a simple example that you can use with a vSimpleTrigger but that's basically it, access controller and change the speed
using Invector.vCharacterController; using UnityEngine;
public class changeSpeedTest : MonoBehaviour { public float runningSpeed = 10f; public void ChangeSpeed(Collider other) { var tpController = other.GetComponent<vThirdPersonController>(); tpController.freeSpeed.runningSpeed = runningSpeed; } }
|
|