Integrate with ISRTSCamera

wzxinchen

New member
Hi, I received this message in my email
1610414831658.png

I want to make a game with first person, third person and RTS person, and switch these three modes by the mouse wheel. In addition to using this plug-in, I am still using the https://assetstore.unity.com/packages/tools/camera/is-rts-camera-16705 component. I want to know how I can integrate these two components together easily?

I am a newbie to Unity, and I have been in contact with Unity for almost four months.
I have done some work, including studying the source code of Ultimate Character Controller and making a few modifications and integrating it into the existing code. Many problems have appeared in the process.
If possible, I hope you can provide the following support
1. Provide a complete demo of integrated ISRTSCamera for me to learn, so that I can directly learn your source code to quickly understand how to integrate
2. If you can't do the first point, I have a specific problem now, but there will be quite a few problems during the actual integration process. The current stuck problems are as follows

Gravity is effective, but it seems that radiographic detection is ineffective.
The specific performance is that there is a big map (Terrain) in my scene, this big map is attached with Terrain Colider, and I can confirm that the initial position of the character is indeed above the big map (because I manually specified the position in the program) , But this role will drop all the way down. When I debugged it, I found that Terrain was not detected.
 
Last edited:
I found that if I remove the parameter m_CharacterLayerManager.SolidObjectLayers, Terrain can be detected (it will output Hit), but I have changed the parameter SolidObjectLayers to Terrain, and it still can be detected

C#:
 if(Physics.CapsuleCastAll(startEndCap, endEndCap, radius, direction.normalized, direction.magnitude + c_ColliderSpacing, m_CharacterLayerManager.SolidObjectLayers).Any())
                    {
                        Debug.Log("hit");
                    }
                    localHitCount = Physics.CapsuleCastNonAlloc(startEndCap, endEndCap, radius, direction.normalized, m_RaycastHits, direction.magnitude + c_ColliderSpacing, m_CharacterLayerManager.SolidObjectLayers, QueryTriggerInteraction.Ignore);
 
Last edited:
Another problem, not serious, I did not connect the joystick, but the joystick was actually detected and automatically switched to the joystick mode
 
By modifying SolidObjectLayers to Terrain, I successfully integrated initially and realized the role of walking on the map. The problem now is, I ran your demo and found that in the first person, mouse events are invalid (for example, shooting), and switching perspective (v key) is also invalid
 
Reinstalled the package and entered the debugging state. After forcibly updating the Input Manager, it was normal
 
1. Provide a complete demo of integrated ISRTSCamera for me to learn, so that I can directly learn your source code to quickly understand how to integrate
I have not used ISRTSCamera so I am unable to provide an integration right now. With that said, you'll want to create a new ViewType very similar to the Cinemachine integration. At a basics you'll want to create a new ViewType and then use the rotation/position set by ISRTSCamera. If you take the example class from the documentation you'd then modify it to use the new rotation/position:
Code:
    public override Quaternion Rotate(float horizontalMovement, float verticalMovement, bool immediateUpdate)
    {
        return IRTSCamera.Rotation;
    }

    public override Vector3 Move(bool immediateUpdate)
    {
        return IRTSCamera.Position;
    }

The specific performance is that there is a big map (Terrain) in my scene, this big map is attached with Terrain Colider, and I can confirm that the initial position of the character is indeed above the big map (because I manually specified the position in the program) , But this role will drop all the way down. When I debugged it, I found that Terrain was not detected.
I'm not following. Are you saying that the character isn't detecting the ground layer? As you mentioned in your previous post you will want to make sure you specify the correct layers in the Character Layer Manager. You don't need to make any code changes.

Another problem, not serious, I did not connect the joystick, but the joystick was actually detected and automatically switched to the joystick mode
The Unity Input Manager doesn't have very good support for gamepads. I recommend using the Unity Input System or Rewired integration.
 
I think you can publish a book that explains this plug-in in detail. At the moment, your documentation looks too brief
 
I think you can publish a book that explains this plug-in in detail. At the moment, your documentation looks too brief
We have about 300 pages of documentation explaining how each system is setup. If you are just getting started I highly recommend watching the videos as those show visually how to setup something.

Of course, if you have a specific section that you'd like to see improved you can let us know and we will see what we can add to it!

edit: Thanks for updating your review :)
 
Last edited:
Top