jun12321
New vMember
Help!!!!!!!!!!!!!
Posts: 3
|
Post by jun12321 on Mar 26, 2024 13:57:43 GMT
You are trying to adjust the speed in another script. But it was vThirdPersonMotor who made the public declaration, not vThirdPersonController. I want to adjust the speed in the new script. However, as in the example, these scripts do not solve the problem. Is there a solution? plz I want to import and adjust the speed variable from the new script and apply it. I'm a beginner so I want you to show me the resolved code Finally, if you use root motion, you can see the rigid body, They say you can use extra speed, but I don't know what it means. Could you please let me know? using System.Collections;
using System.Collections.Generic;
using System.Security.Cryptography;
using UnityEngine;
using static Invector.vCharacterController.vThirdPersonMotor;
public class Controller : MonoBehaviour
{
GameObject ob;
public float i;
private float Bottomtime = -1.0f;
public float intervel = 0.25f;
void Start()
{
i = ob.GetComponent<vMovementSpeed>().runningSpeed;
}
void Update()
{
if (Input.GetKeyDown(KeyCode.V))
{
if ((Time.time - Bottomtime) < intervel)
{
i = 4f;
Bottomtime = -1.0f;
}
else
{
i = 8f;
Bottomtime = Time.time;
}
}
}
}
|
|